You are not logged in.
Ok with
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on,rombar=0
the error is gone. dmesg says only
[21593.742734] kvm: zapping shadow pages for mmio generation wraparound
But there is still no output on the monitor on the 480GTX.
Offline
Ok with
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on,rombar=0the error is gone. dmesg says only
[21593.742734] kvm: zapping shadow pages for mmio generation wraparoundBut there is still no output on the monitor on the 480GTX.
You need a ROM to use VGA assignment. If we can't read it from the card, you can try to download one from the TechPowerUp database. However, not being able to get the ROM from the card itself probably means that the host drivers aren't properly blacklisted or the assigned device is actually the boot VGA device. Using pci-stub.ids=$VENDOR:$DEVICE is the preferred way to make sure no host drivers attach to the device. Replace $VENDOR and $DEVICE with the PCI IDs for your card found from lspci -nn.
EDIT, I see you're using pci-stub:
Here is my cmdline
pci-stub.ids=10de:06c0,10de:0be5
So make sure your BIOS is set to initialize the IGD, not the PCIe graphics card.
Last edited by aw (2014-11-19 23:03:06)
http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses? Try https://www.redhat.com/mailman/listinfo/vfio-users
Offline
At boot I get the following error, i don't know if it has to do something with it:
[ 28.354419] [drm:ilk_display_irq_handler] *ERROR* Pipe B FIFO underrun [ 28.354429] [drm:cpt_set_fifo_underrun_reporting] *ERROR* uncleared pch fifo underrun on pch transcoder B [ 28.354430] [drm:cpt_serr_int_handler] *ERROR* PCH transcoder B FIFO underrun
BTW, this is a classic indication that the i915 arbiter patch is either not applied or not enabled. If you have Intel graphics and you get this, you'll never get VM boot output to the assigned VGA until it's fixed.
http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses? Try https://www.redhat.com/mailman/listinfo/vfio-users
Offline
http://sprunge.us/HWaY
http://sprunge.us/UiVa
I compiled the kernel with the two patches, because the patches linked in the first post does not patch against 3.17.3.
Here is the pkgbuild:
http://sprunge.us/ciHf
Where would be the perfect place for a printk to make sure all worked out?
After
+ if (!i915.enable_hd_vgaarb || !HAS_PCH_SPLIT(dev)) {
Or add in this section
if (i915.enable_hd_vgaarb)
printk( ... );
Edit: Tomorrow I have time to compile again.
Last edited by Rommy (2014-11-19 23:30:37)
Offline
I'm wondering if it's possible to to passthrough a video card to a Mac OS KVM guest using the described methods. I'm not starting a legal discussion here, just considering it from a technical point of view. Has anybody tried such a configuration yet? It could be a cost effective competitor to any commercial external PCI over Thunderbolt solution.
Offline
I'm wondering if it's possible to to passthrough a video card to a Mac OS KVM guest using the described methods. I'm not starting a legal discussion here, just considering it from a technical point of view. Has anybody tried such a configuration yet? It could be a cost effective competitor to any commercial external PCI over Thunderbolt solution.
It's possible
Offline
dakabali wrote:I'm wondering if it's possible to to passthrough a video card to a Mac OS KVM guest using the described methods. I'm not starting a legal discussion here, just considering it from a technical point of view. Has anybody tried such a configuration yet? It could be a cost effective competitor to any commercial external PCI over Thunderbolt solution.
It's possible
Cool. As your screenshot shows a delegated Quadro card: Is there any restriction to the Quadro series or would it work with any (Nvidia) card? Thanks.
Offline
nbhs wrote:dakabali wrote:I'm wondering if it's possible to to passthrough a video card to a Mac OS KVM guest using the described methods. I'm not starting a legal discussion here, just considering it from a technical point of view. Has anybody tried such a configuration yet? It could be a cost effective competitor to any commercial external PCI over Thunderbolt solution.
It's possible
Cool. As your screenshot shows a delegated Quadro card: Is there any restriction to the Quadro series or would it work with any (Nvidia) card? Thanks.
It's a quadrified GTX470, and it did work on osx before i modded it, the problem i have with it (if i use it as primary) is that i have to reboot the host every time i restart the vm, i also have to boot with PciRoot=1 or i get no output. If you plan to do this i recommend checking out which cards work on "hackintosh", for example im able to pass through my radeon 6950 but i get a white screen after it finishes booting, which also happens natively.
Last edited by nbhs (2014-11-20 09:58:44)
Offline
Hey all.
i'm wondering why i got both kvm errors. Still i can run it..
[ 516.117869] kvm: SMP vm created on host with unstable TSC; guest TSC will not be reliable
[ 516.250273] pci-stub 0000:03:00.0: enabling device (0000 -> 0003)
[ 517.403936] pci-stub 0000:03:00.0: kvm assign device
[ 517.878698] pci-stub 0000:03:00.1: enabling device (0000 -> 0002)
[ 517.878781] pci-stub 0000:03:00.1: kvm assign device
[ 517.980035] pci-stub 0000:00:1d.0: kvm assign device
[ 522.078331] kvm: zapping shadow pages for mmio generation wraparound
[ 531.279711] pci-stub 0000:03:00.0: irq 51 for MSI/MSI-X
My hardware:
intel i7 4820k
Msi X79A-GD65-8D
Radeon R9 290x (for windows)
Nvidia gtx480 -> Quadro 6000 (for host)
Kernel: 3.17.3-1-ARCH
Qemu build from AUR [installed: 2.2.r36230.gaf3ff19-1]
VMstart script
#!/bin/bash
sudo qemu-system-x86_64 --enable-kvm -m 8192 -localtime \
-cpu host -smp 4,sockets=1,cores=4,threads=1 \
-monitor stdio -pflash /usr/share/ovmf/x64/ovmf_x64.bin \
-usbdevice tablet -vga qxl \
-drive file=/samssd/janze/virtualpc/qemu-img/titan8 \
-device pci-assign,host=03:00.0 \
-device pci-assign,host=03:00.1 \
-device pci-assign,host=00:1d.0 \
-drive file=/tilaa/data/virtimgdata
Host boot
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=c92efce4-a1ee-4b8b-9d49-ab570fdf7546 rw intel_iommu=on pci-stub.ids=1002:67b0,1002:aac8,8086:1d26
Offline
Hey all.
i'm wondering why i got both kvm errors. Still i can run it..[ 516.117869] kvm: SMP vm created on host with unstable TSC; guest TSC will not be reliable [ 516.250273] pci-stub 0000:03:00.0: enabling device (0000 -> 0003) [ 517.403936] pci-stub 0000:03:00.0: kvm assign device [ 517.878698] pci-stub 0000:03:00.1: enabling device (0000 -> 0002) [ 517.878781] pci-stub 0000:03:00.1: kvm assign device [ 517.980035] pci-stub 0000:00:1d.0: kvm assign device [ 522.078331] kvm: zapping shadow pages for mmio generation wraparound [ 531.279711] pci-stub 0000:03:00.0: irq 51 for MSI/MSI-X
What errors? Nothing here indicates an error other than you're using legacy KVM device assignment, not VFIO.
My hardware:
intel i7 4820k
Msi X79A-GD65-8D
Radeon R9 290x (for windows)
Nvidia gtx480 -> Quadro 6000 (for host)Kernel: 3.17.3-1-ARCH
Qemu build from AUR [installed: 2.2.r36230.gaf3ff19-1]
Is this a hardware mod'd Nvidia card? EDIT: Doesn't matter, host
VMstart script
#!/bin/bash sudo qemu-system-x86_64 --enable-kvm -m 8192 -localtime \ -cpu host -smp 4,sockets=1,cores=4,threads=1 \ -monitor stdio -pflash /usr/share/ovmf/x64/ovmf_x64.bin \ -usbdevice tablet -vga qxl \ -drive file=/samssd/janze/virtualpc/qemu-img/titan8 \ -device pci-assign,host=03:00.0 \ -device pci-assign,host=03:00.1 \ -device pci-assign,host=00:1d.0 \ -drive file=/tilaa/data/virtimgdata
Host boot
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=c92efce4-a1ee-4b8b-9d49-ab570fdf7546 rw intel_iommu=on pci-stub.ids=1002:67b0,1002:aac8,8086:1d26
You haven't actually shown an error, but using pci-assign you're not going to be able to reset the bus like vfio-pci will do. You also seem to be specifying -drive options with no interface, is the problem that the VM has no disk?
EDIT: There's no guarantee that a Radeon card will work as a secondary graphics adapter for the VM. Some people report it works, in other cases it doesn't. It depends on the driver in the guest and is not the focus of this forum thread.
Last edited by aw (2014-11-20 14:05:19)
http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses? Try https://www.redhat.com/mailman/listinfo/vfio-users
Offline
BTW, this is a classic indication that the i915 arbiter patch is either not applied or not enabled. If you have Intel graphics and you get this, you'll never get VM boot output to the assigned VGA until it's fixed.
Omg? Overworked? To tired? I don't know. I am sorry for wasting your time.
I compiled the kernel again with the patches and edited the arbiter patch.
I didnt want to edit the diff file so I used the same line. (For every one not knowing if the patch is working: http://sprunge.us/WfOe )
dmesg says:
[ 26.297580] vgaarb: enable_hd_vgaarb = 1
But the error is NOT gone
[ 26.498934] [drm:ilk_display_irq_handler] *ERROR* Pipe B FIFO underrun
[ 26.498950] [drm:cpt_set_fifo_underrun_reporting] *ERROR* uncleared pch fifo underrun on pch transcoder B
[ 26.498950] [drm:cpt_serr_int_handler] *ERROR* PCH transcoder B FIFO underrun
But now I get an output at the monitor and the qemu error is gone. I dont know what happed, I did makepkg and pacman -U paket, sorry
Edit: Is there an easy way I do not have to be root in X?
Edit2: Ok, I found a pdf file you linked to this topic
Last edited by Rommy (2014-11-20 14:18:36)
Offline
kvm: SMP vm created on host with unstable TSC; guest TSC will not be reliable
kvm: zapping shadow pages for mmio generation wraparound
Those are what i'm wondering.. why i get those warns?
I did try whit VFIO, but after radeon driver install i got BSoD.
Pci-assing is working for me.
Thing why i wonder this is my windows 8.1 quest system interrupt process is eating CPU usage sometimes. And host cpu usage have one thread 100% usage peak same time.
Last edited by janze (2014-11-20 14:36:31)
Offline
Hello all,
I have my kernel patched (downloaded from the first post) and installed.
my kernel options are:
pcie_aspm=force acpi_osi=Linux acpi=force acpi_enforce_resources=lax i915.enable_rc6=1 i915.enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 drm.vblankoffdelay=1 acpi_backlight=vendor intel_pstate=disable pci-stub.ids=10de:1184,10de:030a intel_iommu=on,igfx_off rdblacklist=nouveau nouveau.modeset=0 elevator=noop intremap=no_x2apic_optout libata.force=noncq quiet loglevel=3 i915.enable_hd_vgaarb=1 libata.noacpi=1 pcie_acs_override=downstream
Running the test part works perfect:
qemu-system-x86_64 -enable-kvm -M q35 -m 8192 -cpu host,kvm=off -smp 4,sockets=1,cores=4,threads=1 -bios /usr/share/qemu/bios.bin -vga cirrus -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=off -device vfio-pci,host=01:00.1,bus=root.1,addr=00.1
Adding the Virtio Controller works perfect as well:
-device virtio-scsi-pci,id=scsi
Problems?? Yes... when I attach the hard drive / cdrom...
sudo qemu-system-x86_64 -enable-kvm -M q35 -m 8192 -cpu host,kvm=off -smp 4,sockets=1,cores=4,threads=1 -bios /usr/share/qemu/bios.bin -vga cirrus -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=off -device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 -device virtio-scsi-pci,id=scsi -drive file=/home/jgomez/VM/win7.img,id=disk,format=raw -device scsi-hd,drive=disk
qemu-system-x86_64: -device scsi-hd,drive=disk: Property 'scsi-hd.drive' can't take value 'disk', it's in use
What I would like, if possible?
To have the hard drive with Virtio and two cdroms, one with virtio for Windows 7.iso and the other one with SATA / IDE with the Virtio drivers...
I did it before but I do not know why is giving me this error with "Property 'scsi-hd.drive' can't take value 'disk', it's in use".
Please, can someone bring me some light on this?
Thanks a lot in advance.
Best regards,
TheArcher
Offline
Hello all,
I have my kernel patched (downloaded from the first post) and installed.
my kernel options are:
pcie_aspm=force acpi_osi=Linux acpi=force acpi_enforce_resources=lax i915.enable_rc6=1 i915.enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 drm.vblankoffdelay=1 acpi_backlight=vendor intel_pstate=disable pci-stub.ids=10de:1184,10de:030a intel_iommu=on,igfx_off rdblacklist=nouveau nouveau.modeset=0 elevator=noop intremap=no_x2apic_optout libata.force=noncq quiet loglevel=3 i915.enable_hd_vgaarb=1 libata.noacpi=1 pcie_acs_override=downstream
Oh dear, does it also run faster if you stand on your head?
EDIT: The ironic part is that the i915 maintainer won't take the enable_hd_vgaarb patch because he doesn't want users to need to specify module options. BTW, with all these tuning options, you do know that enable_hd_vgaarb=1 disables host DRI, right?
Running the test part works perfect:
qemu-system-x86_64 -enable-kvm -M q35 -m 8192 -cpu host,kvm=off -smp 4,sockets=1,cores=4,threads=1 -bios /usr/share/qemu/bios.bin -vga cirrus -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=off -device vfio-pci,host=01:00.1,bus=root.1,addr=00.1
What was this meant to test? You're using -vga cirrus and x-vga=off... so you've successfully attached a secondary GPU? The test that I'm aware of would be to use -vga none and x-vga=on in order to see if the monitor connected to the assigned GPU lights up from seabios running the VGA ROM.
Adding the Virtio Controller works perfect as well:
-device virtio-scsi-pci,id=scsi
Problems?? Yes... when I attach the hard drive / cdrom...
sudo qemu-system-x86_64 -enable-kvm -M q35 -m 8192 -cpu host,kvm=off -smp 4,sockets=1,cores=4,threads=1 -bios /usr/share/qemu/bios.bin -vga cirrus -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=off -device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 -device virtio-scsi-pci,id=scsi -drive file=/home/jgomez/VM/win7.img,id=disk,format=raw -device scsi-hd,drive=disk qemu-system-x86_64: -device scsi-hd,drive=disk: Property 'scsi-hd.drive' can't take value 'disk', it's in use
What I would like, if possible?
To have the hard drive with Virtio and two cdroms, one with virtio for Windows 7.iso and the other one with SATA / IDE with the Virtio drivers...I did it before but I do not know why is giving me this error with "Property 'scsi-hd.drive' can't take value 'disk', it's in use".
disk might be a reserved word, maybe use disk0
Last edited by aw (2014-11-20 19:05:25)
http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses? Try https://www.redhat.com/mailman/listinfo/vfio-users
Offline
I was wondering what options people are recommending when compiling QEMU, currently I have:
./configure \
--prefix=/usr \
--enable-xen \
--enable-xen-pci-passthrough \
--enable-kvm
Anything else I should be using for stability/performance?
I'm currently using Ubuntu 14.04 and 2.2.0-rc2 off of the QEMU wiki since the included package on Ubuntu doesn't have the kvm=off option to kill code 43.
Asus Rampage IV Extreme (x79) and 3930K
ATI 4890 (host) and GTX 780 (passthrough)
Offline
I was wondering what options people are recommending when compiling QEMU
I typically only use --prefix for local builds. Why do you need the xen options? KVM support should be enabled automatically.
http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses? Try https://www.redhat.com/mailman/listinfo/vfio-users
Offline
Did you do something special to get the VGA Card working in the guest? I am not a windows pro, but I thought, I only have to install the nvidia blob. Debuging is not easy in Windows 8 :-(
Offline
thearcherblog wrote:Hello all,
I have my kernel patched (downloaded from the first post) and installed.
my kernel options are:
pcie_aspm=force acpi_osi=Linux acpi=force acpi_enforce_resources=lax i915.enable_rc6=1 i915.enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 drm.vblankoffdelay=1 acpi_backlight=vendor intel_pstate=disable pci-stub.ids=10de:1184,10de:030a intel_iommu=on,igfx_off rdblacklist=nouveau nouveau.modeset=0 elevator=noop intremap=no_x2apic_optout libata.force=noncq quiet loglevel=3 i915.enable_hd_vgaarb=1 libata.noacpi=1 pcie_acs_override=downstream
Oh dear, does it also run faster if you stand on your head?
EDIT: The ironic part is that the i915 maintainer won't take the enable_hd_vgaarb patch because he doesn't want users to need to specify module options. BTW, with all these tuning options, you do know that enable_hd_vgaarb=1 disables host DRI, right?
About all those options is because I was checking one by one all the error on journalctl when I installed arch and found solutions for all the messages and other problems (vsync, power control,...)
Yes, I know that disables the DRI inside but I do not care if works fine
Running the test part works perfect:
qemu-system-x86_64 -enable-kvm -M q35 -m 8192 -cpu host,kvm=off -smp 4,sockets=1,cores=4,threads=1 -bios /usr/share/qemu/bios.bin -vga cirrus -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=off -device vfio-pci,host=01:00.1,bus=root.1,addr=00.1
What was this meant to test? You're using -vga cirrus and x-vga=off... so you've successfully attached a secondary GPU? The test that I'm aware of would be to use -vga none and x-vga=on in order to see if the monitor connected to the assigned GPU lights up from seabios running the VGA ROM.
Sorry, that was my fault, I tested it with vga none and x-vga=on and working fine (later I disabled it for not changing to HDMI2 on my TV all time)
Adding the Virtio Controller works perfect as well:
-device virtio-scsi-pci,id=scsi
Problems?? Yes... when I attach the hard drive / cdrom...
sudo qemu-system-x86_64 -enable-kvm -M q35 -m 8192 -cpu host,kvm=off -smp 4,sockets=1,cores=4,threads=1 -bios /usr/share/qemu/bios.bin -vga cirrus -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=off -device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 -device virtio-scsi-pci,id=scsi -drive file=/home/jgomez/VM/win7.img,id=disk,format=raw -device scsi-hd,drive=disk qemu-system-x86_64: -device scsi-hd,drive=disk: Property 'scsi-hd.drive' can't take value 'disk', it's in use
What I would like, if possible?
To have the hard drive with Virtio and two cdroms, one with virtio for Windows 7.iso and the other one with SATA / IDE with the Virtio drivers...I did it before but I do not know why is giving me this error with "Property 'scsi-hd.drive' can't take value 'disk', it's in use".
disk might be a reserved word, maybe use disk0
I tested with different words there but still the same result...
Anyway... thanks a lot for your quick reply!!
Regards,
TheArcher
Offline
Did you do something special to get the VGA Card working in the guest? I am not a windows pro, but I thought, I only have to install the nvidia blob. Debuging is not easy in Windows 8 :-(
Sorry for stepping in , but I didn't need any special configuration to make both of my Windows 8.1 VMs work . I Just installed Nvidia's drivers and they were good to go . Also Windows 10 TP worked good (although I didn't install any drivers , because I was just testing the OS itself) .
I will do a full Windows 10 installation today if only OVMF would recognize my USB controller for my keyboard to work . Oh wellz .
Last edited by Denso (2014-11-21 04:43:25)
Offline
Thank you for your answer. I deltetd my drive and installed Win8 again in a new drive. This time I let Windows search for VGA driver. Now the device manager says error code: 43. I dont really know how to proceed.
I know, why I use linux -.-
Little question: How can I eject the card in a Linux guest?
Offline
Thank you for your answer. I deltetd my drive and installed Win8 again in a new drive. This time I let Windows search for VGA driver. Now the device manager says error code: 43. I dont really know how to proceed.
I know, why I use linux -.-Little question: How can I eject the card in a Linux guest?
1. You just don't tell windowns "search for drivers yourself, you filthy slave!", you feed it with the GUI installer DL'ed from vendor's site. And if it likes it - everything will work. It might dislike the "food" or the feeding process and randomly throw up BSOD, sometimes the driver install may get completed, but after a reboot it will go BSOD all over your screen and stuff.
2.Try rmmod(or any other way you like) to unload the modules that claim the card, and you're good to go "physically" unplugging it, afair. Maybe the device needs to be powered down via sysfs or something.
EDIT:http://www.linux-kvm.org/page/Hotadd_pci_devices
You'll also need appropriate modules loaded to get pci hotplug working.
Last edited by Duelist (2014-11-21 19:02:20)
The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.
Offline
Thank you for your answer. I deltetd my drive and installed Win8 again in a new drive. This time I let Windows search for VGA driver. Now the device manager says error code: 43. I dont really know how to proceed.
I know, why I use linux -.-
VFIO VGA FAQ question 10
Little question: How can I eject the card in a Linux guest?
Something in /sys I'm sure... you were saying about linux...
http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses? Try https://www.redhat.com/mailman/listinfo/vfio-users
Offline
Any suggestion to my "it's in use" issue?
I really do not know what else to try...
Thanks
Offline
Any suggestion to my "it's in use" issue?
I really do not know what else to try...
Thanks
Add
,if=none
to your disk option, otherwise I think it's automatically getting added to the vfio-scsi-pci device before the scsi-hd device is being parsed.
http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses? Try https://www.redhat.com/mailman/listinfo/vfio-users
Offline
thearcherblog wrote:Any suggestion to my "it's in use" issue?
I really do not know what else to try...
Thanks
Add
,if=none
to your disk option, otherwise I think it's automatically getting added to the vfio-scsi-pci device before the scsi-hd device is being parsed.
Thanks
With that seems to load the fine the hard drive but how can I attach both cdroms (one virtio and one IDE/SATA) if all are giving me the same error?
Offline