GTA V on Linux (Skylake Build + Hardware VM Passthrough)

i appreciate all the help i probably would have never gotten this far without it
my only problem now is building a shell script to run it which i have no idea how to do um i ran the test one

cp /usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd /tmp/my_vars.fd
qemu-system-x86_64 \
  -enable-kvm \
  -m 2048 \
  -cpu host,kvm=off \
  -vga none \
  -device vfio-pci,host=01:00.0 \
  -drive if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd \
  -drive if=pflash,format=raw,file=/tmp/my_vars.fd

but i get

qemu-system-x86_64: -device vfio-pci,host=01:00.0: vfio: error opening /dev/vfio/32: No such file or directory
qemu-system-x86_64: -device vfio-pci,host=01:00.0: vfio: failed to get group 32
qemu-system-x86_64: -device vfio-pci,host=01:00.0: Device initialization failed

im not sure why im getting this error probably because there is no directory called /dev/vfio/32 but i don't know which line i need to change to take it to the correct directory

im not sure why im getting this error i swear one problem fixed another created but in the end it will be worth it

Well to tell you the truth.....I didn't build one, but again it was because I did the pci-stub type setup, I know using the i915 driver on a Intel system and vfio-pci you will need the script but I will be of no help to you on getting it accomplished, I'm pretty well a noob at Linux with six months experience and while I have written a couple bash scripts I am just mimicking someone else's code and making changes based on what I think will work....sorry.

Again hopefully someone else will read the post and have a idea, I know there are lots of people here who can help you with the script.

I know you can see this but the path is the problem........

i mean i am too using pci-stub and i dont have anything to do with i915 drivers cause im using haswell-e not skylake but you are right about the path i just dont know what the right path is
secondly how would i achieve this using pci-stub and no script?

cause a gui would be amazing if there is one

After I had pci-stub taking claim to the ids I listed and knew that Linux couldn't touch it being basically blacklisted in grub, so I had a KVM already built that I had been testing in, I deleted it and built a new one, when I got to the hardware adding portion of setting up the KVM using virt-manager it has a button for other hardware that isn't listed when I clicked on it the ids of the GPU pci-stub was holding was there, I added it to the hardware and installed Win 7.

When Win 7 was finished and I rebooted the KVM/Win 7 I went to device manager and the 270x was listed but not loaded because of no drivers, I did the usual Windows thing right click, properties, update driver, and it went to AMDs site and DL'd the drivers, I installed the file which included catylist, rebooted the KVM/Win7 again and went back to device manager, the card was available so I switched to it.

I did go back and delete the generic VGA driver that Windows was using before having the drivers for the 270x but it wasn't necessary because if there ever was a problem with the card Windows would just reload the generic driver so it would have a display to use.

It has works ever since....no script, no dracut, no modprob, but it does work on my system and is stable.

are you booting uefi?

no.....and that may be the difference.

im looking at the virt-manager now it seems great i gotta wait for the freaking 2 hour download of windows 10 to complete before i can test everything out properly once again thanks you have been a tremendous help ill let you know if i have anymore questions

i really wanna use uefi is there a way to do that with virt-manager?

I don't know since I've never done it, I'm using kernel 4.0 and some of the functionality didn't come to pass until ver 4.1, so even though all my stuff is UEFI capable I passed on trying to do it that way, in the end I'm unclear as how it would make much of a difference for me....but like I said I'm a noob. lol

Are you running the script as root?

yes i used root for most of this cause i found it easier just to leave the terminal and file manager open that way since i was constantly switching between them

like @blanger said its the wrong path but idk what the right one is

im trying virt-manager but i get the error virt-manager, failed to initialize KVM: Permission denied

Maybe someone here can help me cause I'm at a loss. Been going at this since Wendell first posted this and every attempt I've made with using OMVF uefi bios has done nothing. I've only been able to get it to show "UEFI Interactive Shell" with "Shell>" waiting for command.

The setup is:
Archlinux (was linux 4.3... now 4.2)
i5-4690K
GTX 980

nouveau is blacklisted, PCI Stub is set up and working, no issues with vfio-pci, intel IOMMU enabled, and intel virtualization enabled.
Virt-Manager has been working and able to passthrough the GPU w/ Seabios, but once I try OMVF I can't get it to boot.
I might be missing something here but I've knocked my head against this for a while. I've tried instructions and qemu scripts like Wendell's, from the Arch Forum thread, and other places to no avail so I've gave up on those for right now.

Today I reformatted and started with a fresh Arch install (haven't upgraded back to 4.3 yet) to start back from zero and decided to try this guy's method: https://www.youtube.com/watch?v=r-AN8E8ADL0

I've tried that way and still come up with the OVMF not booting and dropping into the Shell.
The current script I'm using right now: http://pastebin.com/cyvLDAT6

Problem still happens if I use the methods like Wendell has were I give qemu the ovmf VARS and CODE files.

sp why is my virt-manager unable to initialize kvm im running it as root

i mean i cant figure it out

Have you tried running it as non-root? Does it ask for your password after starting it?
In my Arch install it does just that and has access to KVM after putting in the password. (by default, I've not modified the app launcher made upon install)