You are not logged in.
I am not using arch currently, but this is the best resource I could find with regards to vga passthrough on QEMU.
I have gotten everything working so far, except actual passthrough. When I run my vm, I hear the graphics card that I am passing through spin up like it does on boot, but when I switch to the input from that card, there is no display. What could be causing this?
Edit: And, in the original guide (which is a few years old now) it says you need seabios - but I cant see any commands that link to it or ask QEMU to use it in the OP, does qemu automatically detect that seabios is installed and use it ?
Last edited by instantepiphany (2015-02-22 03:09:03)
Offline
aw wrote:aw wrote:You should not need to touch /etc/libvirt/qemu.conf
Without touching user, group:
Does that mean you only reverted user/group or does it mean that you're using the referenced qemu.conf as is like I've suggested a couple times now?
$ virsh start Win81 error: Failed to start domain Win81 error: Requested operation is not valid: PCI device 0000:01:00.0 is not assignable # virsh start Win81 error: Failed to start domain Win81 error: internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied failed to initialize KVM: Permission denied
After changing user and group to root, I can use my vm as root, on user still same error.
Do you have any errors in /var/log/libvirt/qemu/Win81.log?
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 am not using arch currently, but this is the best resource I could find with regards to vga passthrough on QEMU.
I have gotten everything working so far, except actual passthrough. When I run my vm, I hear the graphics card that I am passing through spin up like it does on boot, but when I switch to the input from that card, there is no display. What could be causing this?
Edit: And, in the original guide (which is a few years old now) it says you need seabios - but I cant see any commands that link to it or ask QEMU to use it in the OP, does qemu automatically detect that seabios is installed and use it ?
Don't bother with a -bios option, those instructions are outdated.
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
Does that mean you only reverted user/group or does it mean that you're using the referenced qemu.conf as is like I've suggested a couple times now?
I have used qemu.conf from you, and changed user, group (only!) to get it working (at least on root).
Without set user,group I'm getting error which you can see below.
$ virsh start Win81
error: Failed to start domain Win81
error: Requested operation is not valid: PCI device 0000:01:00.0 is not assignable
# virsh start Win81
error: Failed to start domain Win81
error: internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
Do you have any errors in /var/log/libvirt/qemu/Win81.log?
After setting user, group to "root" in qemu.conf >
Starting virsh start Win81 on...
* normal user: (which is giving me PCI device 0000:01:00.0 is not assignable) is not producing anything in /var/log/libvirt/qemu/Win81.log.
* root user: it's working, and no errors in log
2015-02-22 05:14:40.522+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -name Win81 -S -machine pc-i440fx-2.2,accel=kvm,usb=off -cpu host,kvm=off,pmu=on -drive file=/home/len/win/bios/ovmf_code_x64.bin,if=pflash,format=raw,unit=0,readonly=on -drive file=/var/lib/libvirt/qemu/nvram/Win81_VARS.fd,if=pflash,format=raw,unit=1 -m 6144 -realtime mlock=off -smp 4,sockets=1,cores=4,threads=1 -uuid df602579-a4f2-41b9-bb2f-6e23d65a24bd -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/Win81.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device lsi,id=scsi0,bus=pci.0,addr=0x3 -drive file=/dev/sdb,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/dev/sdc,if=none,id=drive-virtio-disk1,format=raw,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 -drive file=/dev/sdd,if=none,id=drive-virtio-disk2,format=raw,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk2,id=virtio-disk2 -netdev tap,fd=21,id=hostnet0,vhost=on,vhostfd=22 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:fc:a7:cd,bus=pci.0,addr=0x2 -device vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,multifunction=on,addr=0x7 -device vfio-pci,host=01:00.1,id=hostdev1,bus=pci.0,addr=0x7.0x1 -device vfio-pci,host=00:1b.0,id=hostdev2,bus=pci.0,addr=0x9 -device usb-host,hostbus=3,hostaddr=3,id=hostdev3 -device usb-host,hostbus=3,hostaddr=2,id=hostdev4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0xa -msg timestamp=on
Domain id=3 is tainted: high-privileges
Domain id=3 is tainted: host-cpu
2015-02-22T05:14:47.464676Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2015-02-22T05:14:47.464697Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
Only mouse is not working (sometimes)
____________________________________________
There are some performance test (compared bare and kvm), for people who care:
PerformanceTest 7.0
Info
Summary - 84,8%
CPU - 90,9%
2D - 79,3%
3D - 84,4%
Mem - 82,3%
Disk - 97,3%
3DMark11
Test 1 - 85.5%
Test 2 - 97.7%
Test 3 - 99.5%
Last edited by Len (2015-02-23 14:55:16)
Offline
aw wrote:Does that mean you only reverted user/group or does it mean that you're using the referenced qemu.conf as is like I've suggested a couple times now?
I have used qemu.conf from you, and changed user, group (only!) to get it working (at least on root).
Without set user,group I'm getting error which you can see below.$ virsh start Win81 error: Failed to start domain Win81 error: Requested operation is not valid: PCI device 0000:01:00.0 is not assignable # virsh start Win81 error: Failed to start domain Win81 error: internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied failed to initialize KVM: Permission denied
aw wrote:Do you have any errors in /var/log/libvirt/qemu/Win81.log?
Starting on normal user: virsh start Win81 (which is giving me PCI device 0000:01:00.0 is not assignable) is not producing anything in /var/log/libvirt/qemu/Win81.log.
The only thing I can find that prints that "not assignable" error in libvirt deals with PCIe ACS testing. I'm surprised both that libvirt is doing this test when the hostdev driver is set to vfio and also that it's failing since libvirt's version of ACS testing is far inferior to vfio in the kernel. You can try setting relaxed_acs_check=1 in qemu.conf, but I also don't see why running as root would make a difference for this test. Perhaps libvirt can't even scan the PCI capabilities of the devices when not running as root. What distro are you using? Something still seems very broken with libvirt. Have you tried disabling selinux/apparmor?
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
The only thing I can find that prints that "not assignable" error in libvirt deals with PCIe ACS testing. I'm surprised both that libvirt is doing this test when the hostdev driver is set to vfio and also that it's failing since libvirt's version of ACS testing is far inferior to vfio in the kernel. You can try setting relaxed_acs_check=1 in qemu.conf, but I also don't see why running as root would make a difference for this test. Perhaps libvirt can't even scan the PCI capabilities of the devices when not running as root. What distro are you using? Something still seems very broken with libvirt. Have you tried disabling selinux/apparmor?
I'm using archlinux, with nothing more then kdebase, qemu, libvirt and some other stuff for 'how can I get it working'-system.
Didn't installed selinux nor apparmor
Checked relaxed_acs_check=1, didn't helped on normal-user, still same. On root, it's pointless I think, cause vm is working on root, without problems (sometimes mouse, hehe).
Maybe something wrong with kernel? .config
Okay, thanks for your time, gotta take a sleep.. it's already 6am here
Last edited by Len (2015-02-22 16:08:01)
Offline
Guys,
I know the main topic here is vga passthrough but this topic is the best resource over the internet when it comes to device passthrough.
I'm trying to make a tv tuner card (TBS6285) works under guest system without success. I can passthrough it successfully, install the drivers and use it for some time, but after some time it just stop get signal.
Neither the host or the guest gives me any hint about the problem looking at dmesg, the only thing I have noticed is the interrupt count at /proc/interrupts stops as soon as the problem occurs.
My setup is the follow:
Hardware:
CPU: Intel Xeon E3-1245V3
MOBO: Supermicro X10SAE-O
RAM: 16GB ECC
VIDEO1: AMD R7 250
VIDEO2: NVIDIA Geforce GT 610
TV TUNER: TBS 6285
Software:
S.O: Arch linux - 3.18.6-1-ARCH (ACS + VGA Arbiter)
Qemu 2.2.50
Libvirt 1.2.13
Any guidance will be welcome.
Thanks
Offline
Guys,
I know the main topic here is vga passthrough but this topic is the best resource over the internet when it comes to device passthrough.
I'm trying to make a tv tuner card (TBS6285) works under guest system without success. I can passthrough it successfully, install the drivers and use it for some time, but after some time it just stop get signal.
Neither the host or the guest gives me any hint about the problem looking at dmesg, the only thing I have noticed is the interrupt count at /proc/interrupts stops as soon as the problem occurs.
Probably broken INTx masking on the tuner card. You can try using the vfio-pci module option nointxmask=1 to mask at the APIC instead of the device, but it makes life very difficult since you then require an exclusive interrupt line for the device. You may try adding a quirk for the device to drivers/pci/quirks.c to isolate it to just that device (see fixups using quirk_broken_intx_masking).
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
bpbastos wrote:Guys,
I know the main topic here is vga passthrough but this topic is the best resource over the internet when it comes to device passthrough.
I'm trying to make a tv tuner card (TBS6285) works under guest system without success. I can passthrough it successfully, install the drivers and use it for some time, but after some time it just stop get signal.
Neither the host or the guest gives me any hint about the problem looking at dmesg, the only thing I have noticed is the interrupt count at /proc/interrupts stops as soon as the problem occurs.
Probably broken INTx masking on the tuner card. You can try using the vfio-pci module option nointxmask=1 to mask at the APIC instead of the device, but it makes life very difficult since you then require an exclusive interrupt line for the device. You may try adding a quirk for the device to drivers/pci/quirks.c to isolate it to just that device (see fixups using quirk_broken_intx_masking).
This tv tuner card supports msi-x interrupt type and this should give an exclusive interrupt line. Could I use what you have suggest with msi interrupts?
Offline
aw wrote:bpbastos wrote:Guys,
I know the main topic here is vga passthrough but this topic is the best resource over the internet when it comes to device passthrough.
I'm trying to make a tv tuner card (TBS6285) works under guest system without success. I can passthrough it successfully, install the drivers and use it for some time, but after some time it just stop get signal.
Neither the host or the guest gives me any hint about the problem looking at dmesg, the only thing I have noticed is the interrupt count at /proc/interrupts stops as soon as the problem occurs.
Probably broken INTx masking on the tuner card. You can try using the vfio-pci module option nointxmask=1 to mask at the APIC instead of the device, but it makes life very difficult since you then require an exclusive interrupt line for the device. You may try adding a quirk for the device to drivers/pci/quirks.c to isolate it to just that device (see fixups using quirk_broken_intx_masking).
This tv tuner card supports msi-x interrupt type and this should give an exclusive interrupt line. Could I use what you have suggest with msi interrupts?
The nointxmask won't have any effect if MSI-X is actually being used. Is MSI-X being used by the device when it's assigned? (host: grep vfio /proc/interrupts) If not, the better option would be to try to make it use MSI-X. If it's a Windows guest, see http://vfio.blogspot.com/2014/09/vfio-i … ndows.html If it is using MSI-X already, then I'm not sure what to suggest. We've seen cards like Nvidia that actually require a PCI config space write to re-enable MSI and needs a quirk to do so because it writes to a read-only offset.
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
bpbastos wrote:aw wrote:Probably broken INTx masking on the tuner card. You can try using the vfio-pci module option nointxmask=1 to mask at the APIC instead of the device, but it makes life very difficult since you then require an exclusive interrupt line for the device. You may try adding a quirk for the device to drivers/pci/quirks.c to isolate it to just that device (see fixups using quirk_broken_intx_masking).
This tv tuner card supports msi-x interrupt type and this should give an exclusive interrupt line. Could I use what you have suggest with msi interrupts?
The nointxmask won't have any effect if MSI-X is actually being used. Is MSI-X being used by the device when it's assigned? (host: grep vfio /proc/interrupts) If not, the better option would be to try to make it use MSI-X. If it's a Windows guest, see http://vfio.blogspot.com/2014/09/vfio-i … ndows.html If it is using MSI-X already, then I'm not sure what to suggest. We've seen cards like Nvidia that actually require a PCI config space write to re-enable MSI and needs a quirk to do so because it writes to a read-only offset.
It's a Linux guest (Ubuntu 14.10), this card seems to have a lot of problems with systems where iommu is enabled, see https://github.com/ljalves/linux_media/issues/66
My card is a TBS6285 v21M like the one on the link above and it has the pericom pci bridge which seems to be the root cause of the problems.
I've already tried to passthrough the pericom pci bridge but i think its not possible to passthrough pci bridges.
When the guest starts, it starts with intx:
[root@home-server ~]# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
0: 19 0 0 0 0 0 0 0 IR-IO-APIC-edge timer
1: 3 0 0 0 0 0 0 0 IR-IO-APIC-edge i8042
7: 10 0 0 0 0 0 0 0 IR-IO-APIC-edge
8: 0 0 0 0 1 0 0 0 IR-IO-APIC-edge rtc0
9: 0 0 1 0 2 0 0 0 IR-IO-APIC-fasteoi acpi
12: 2 0 1 0 0 0 1 0 IR-IO-APIC-edge i8042
16: 13 7 0 0 2 6 1 0 IR-IO-APIC 16-fasteoi ehci_hcd:usb5
17: 288441 31873 0 0 0 0 0 0 IR-IO-APIC 17-fasteoi vfio-intx(0000:07:00.0)
18: 0 0 0 0 0 0 0 0 IR-IO-APIC 18-fasteoi i801_smbus
23: 28 2 0 0 4 1 0 0 IR-IO-APIC 23-fasteoi ehci_hcd:usb6
24: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar0
25: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar1
26: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
27: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
28: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME, pciehp
29: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
30: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
31: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
32: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
35: 40 0 2 1 12 2 2 2 IR-PCI-MSI-edge xhci_hcd
36: 31 2 3 2 13 3 0 1 IR-PCI-MSI-edge xhci_hcd
37: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
38: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
39: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
40: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
41: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
42: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
43: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
44: 80885 118083 83 67 1826 908 382 88 IR-PCI-MSI-edge 0000:00:1f.2
45: 1 0 1 2 4 5 8 3 IR-PCI-MSI-edge mei_me
46: 16896 89344 8 12 263 163 10 19 IR-PCI-MSI-edge eno1
52: 4 0 172 0 20 1 154 3 IR-PCI-MSI-edge snd_hda_intel
53: 1 0 2 0 5 0 0 0 IR-PCI-MSI-edge i915
54: 0 0 39 1 15 0 1 4 IR-PCI-MSI-edge snd_hda_intel
NMI: 1 1 0 0 10 3 0 0 Non-maskable interrupts
LOC: 25166 45620 3162 3118 77738 45167 1567 1477 Local timer interrupts
SPU: 0 0 0 0 0 0 0 0 Spurious interrupts
PMI: 1 1 0 0 10 3 0 0 Performance monitoring interrupts
IWI: 2 0 0 0 0 0 0 0 IRQ work interrupts
RTR: 0 0 0 0 0 0 0 0 APIC ICR read retries
RES: 1660 2067 219 179 71690 20139 91 124 Rescheduling interrupts
CAL: 988 994 1648 1680 1692 1463 1664 1664 Function call interrupts
TLB: 112 85 53 39 658 312 16 33 TLB shootdowns
TRM: 0 0 0 0 0 0 0 0 Thermal event interrupts
THR: 0 0 0 0 0 0 0 0 Threshold APIC interrupts
MCE: 0 0 0 0 0 0 0 0 Machine check exceptions
MCP: 6 6 6 6 6 6 6 6 Machine check polls
HYP: 0 0 0 0 0 0 0 0 Hypervisor callback interrupts
ERR: 10
MIS: 0
Then it changes to msi-x, I'm forcing msi-x interrupts with saa716x_budget int_type=1 in the guest
[root@home-server ~]# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
0: 19 0 0 0 0 0 0 0 IR-IO-APIC-edge timer
1: 3 0 0 0 0 0 0 0 IR-IO-APIC-edge i8042
7: 10 0 0 0 0 0 0 0 IR-IO-APIC-edge
8: 0 0 0 0 1 0 0 0 IR-IO-APIC-edge rtc0
9: 0 0 1 0 2 0 0 0 IR-IO-APIC-fasteoi acpi
12: 2 0 1 0 0 0 1 0 IR-IO-APIC-edge i8042
16: 13 7 0 0 2 6 1 0 IR-IO-APIC 16-fasteoi ehci_hcd:usb5
17: 288441 31873 0 0 0 0 0 0 IR-IO-APIC 17-fasteoi
18: 0 0 0 0 0 0 0 0 IR-IO-APIC 18-fasteoi i801_smbus
23: 28 2 0 0 4 1 0 0 IR-IO-APIC 23-fasteoi ehci_hcd:usb6
24: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar0
25: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar1
26: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
27: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
28: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME, pciehp
29: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
30: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
31: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
32: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME
35: 40 0 2 1 12 2 2 2 IR-PCI-MSI-edge xhci_hcd
36: 31 2 3 2 13 3 0 1 IR-PCI-MSI-edge xhci_hcd
37: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
38: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
39: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
40: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
41: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
42: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
43: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd
44: 80885 112767 83 67 1826 908 382 88 IR-PCI-MSI-edge 0000:00:1f.2
45: 1 0 1 2 4 5 8 3 IR-PCI-MSI-edge mei_me
46: 16896 88670 8 12 263 163 10 19 IR-PCI-MSI-edge eno1
52: 4 0 172 0 20 1 154 3 IR-PCI-MSI-edge snd_hda_intel
53: 1 0 2 0 5 0 0 0 IR-PCI-MSI-edge i915
54: 0 0 39 1 15 0 1 4 IR-PCI-MSI-edge snd_hda_intel
55: 556 253 0 0 68 25 0 1 IR-PCI-MSI-edge vfio-msi[0](0000:07:00.0)
NMI: 1 1 0 0 9 3 0 0 Non-maskable interrupts
LOC: 23680 43632 2955 2927 71642 41880 1478 1388 Local timer interrupts
SPU: 0 0 0 0 0 0 0 0 Spurious interrupts
PMI: 1 1 0 0 9 3 0 0 Performance monitoring interrupts
IWI: 2 0 0 0 0 0 0 0 IRQ work interrupts
RTR: 0 0 0 0 0 0 0 0 APIC ICR read retries
RES: 1647 2052 209 172 68764 19165 88 118 Rescheduling interrupts
CAL: 964 968 1622 1654 1666 1461 1640 1640 Function call interrupts
TLB: 107 82 46 37 622 305 15 30 TLB shootdowns
TRM: 0 0 0 0 0 0 0 0 Thermal event interrupts
THR: 0 0 0 0 0 0 0 0 Threshold APIC interrupts
MCE: 0 0 0 0 0 0 0 0 Machine check exceptions
MCP: 5 5 5 5 5 5 5 5 Machine check polls
HYP: 0 0 0 0 0 0 0 0 Hypervisor callback interrupts
ERR: 10
MIS: 0
Offline
@aw, any more ideas about my problem? I'm kinda stuck.
Offline
On the subject of passthrough, I've got everything working pretty well with my windows gaming VM now except for one thing: I'm unable to pass my DualShock 3 controller's USB connection properly to the VM. In the device manager I see the device but it's failed with a note saying "Device descriptor request failed".
Is anyone passing one of these to a VM? My intent is to use it via bluetooth but need to have it connected via USB first to get the XInputWrapper service working properly.
Last edited by jaeger (2015-02-22 20:47:10)
Offline
@aw, any more ideas about my problem? I'm kinda stuck.
Sorry, I don't use arch, I have no idea what's wrong with your libvirt installation. Maybe others using arch+libvirt have some ideas.
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
Len wrote:@aw, any more ideas about my problem? I'm kinda stuck.
Sorry, I don't use arch, I have no idea what's wrong with your libvirt installation. Maybe others using arch+libvirt have some ideas.
No problem, at least we are trying, btw what dist are you using?
[len@holo ~]$ /usr/sbin/libvirtd
2015-02-22 23:16:51.294+0000: 6911: info : libvirt version: 1.2.13
2015-02-22 23:16:51.294+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:00.0/config': Permission denied
2015-02-22 23:16:51.294+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:01.0/config': Permission denied
2015-02-22 23:16:51.294+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:02.0/config': Permission denied
2015-02-22 23:16:51.294+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:03.0/config': Permission denied
2015-02-22 23:16:51.294+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:14.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:16.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:1a.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:1b.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:1c.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:1c.2/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:1c.3/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:1d.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:1f.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:1f.2/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:00:1f.3/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:01:00.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:01:00.1/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:03:00.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:04:00.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: warning : virPCIDeviceConfigOpen:307 : Failed to open config space file '/sys/bus/pci/devices/0000:05:00.0/config': Permission denied
2015-02-22 23:16:51.295+0000: 6911: error : virPCIDeviceIsBehindSwitchLackingACS:2299 : internal error: Failed to find parent device for 0000:01:00.0
2015-02-22 23:16:51.300+0000: 6911: warning : virHostdevReAttachUSBDevices:1431 : Unable to find device 000.000 in list of active USB devices
2015-02-22 23:16:51.300+0000: 6911: warning : virHostdevReAttachUSBDevices:1431 : Unable to find device 000.000 in list of active USB devices
Managed to get this log, while running
virsh start Win81
error: Failed to start domain Win81
error: Requested operation is not valid: PCI device 0000:01:00.0 is not assignable
as normal user
Offline
aw wrote:bpbastos wrote:This tv tuner card supports msi-x interrupt type and this should give an exclusive interrupt line. Could I use what you have suggest with msi interrupts?
The nointxmask won't have any effect if MSI-X is actually being used. Is MSI-X being used by the device when it's assigned? (host: grep vfio /proc/interrupts) If not, the better option would be to try to make it use MSI-X. If it's a Windows guest, see http://vfio.blogspot.com/2014/09/vfio-i … ndows.html If it is using MSI-X already, then I'm not sure what to suggest. We've seen cards like Nvidia that actually require a PCI config space write to re-enable MSI and needs a quirk to do so because it writes to a read-only offset.
It's a Linux guest (Ubuntu 14.10), this card seems to have a lot of problems with systems where iommu is enabled, see https://github.com/ljalves/linux_media/issues/66
My card is a TBS6285 v21M like the one on the link above and it has the pericom pci bridge which seems to be the root cause of the problems.
I've already tried to passthrough the pericom pci bridge but i think its not possible to passthrough pci bridges.
When the guest starts, it starts with intx:
[root@home-server ~]# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 0: 19 0 0 0 0 0 0 0 IR-IO-APIC-edge timer 1: 3 0 0 0 0 0 0 0 IR-IO-APIC-edge i8042 7: 10 0 0 0 0 0 0 0 IR-IO-APIC-edge 8: 0 0 0 0 1 0 0 0 IR-IO-APIC-edge rtc0 9: 0 0 1 0 2 0 0 0 IR-IO-APIC-fasteoi acpi 12: 2 0 1 0 0 0 1 0 IR-IO-APIC-edge i8042 16: 13 7 0 0 2 6 1 0 IR-IO-APIC 16-fasteoi ehci_hcd:usb5 17: 288441 31873 0 0 0 0 0 0 IR-IO-APIC 17-fasteoi vfio-intx(0000:07:00.0) 18: 0 0 0 0 0 0 0 0 IR-IO-APIC 18-fasteoi i801_smbus 23: 28 2 0 0 4 1 0 0 IR-IO-APIC 23-fasteoi ehci_hcd:usb6 24: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar0 25: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar1 26: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 27: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 28: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME, pciehp 29: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 30: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 31: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 32: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 35: 40 0 2 1 12 2 2 2 IR-PCI-MSI-edge xhci_hcd 36: 31 2 3 2 13 3 0 1 IR-PCI-MSI-edge xhci_hcd 37: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 38: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 39: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 40: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 41: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 42: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 43: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 44: 80885 118083 83 67 1826 908 382 88 IR-PCI-MSI-edge 0000:00:1f.2 45: 1 0 1 2 4 5 8 3 IR-PCI-MSI-edge mei_me 46: 16896 89344 8 12 263 163 10 19 IR-PCI-MSI-edge eno1 52: 4 0 172 0 20 1 154 3 IR-PCI-MSI-edge snd_hda_intel 53: 1 0 2 0 5 0 0 0 IR-PCI-MSI-edge i915 54: 0 0 39 1 15 0 1 4 IR-PCI-MSI-edge snd_hda_intel NMI: 1 1 0 0 10 3 0 0 Non-maskable interrupts LOC: 25166 45620 3162 3118 77738 45167 1567 1477 Local timer interrupts SPU: 0 0 0 0 0 0 0 0 Spurious interrupts PMI: 1 1 0 0 10 3 0 0 Performance monitoring interrupts IWI: 2 0 0 0 0 0 0 0 IRQ work interrupts RTR: 0 0 0 0 0 0 0 0 APIC ICR read retries RES: 1660 2067 219 179 71690 20139 91 124 Rescheduling interrupts CAL: 988 994 1648 1680 1692 1463 1664 1664 Function call interrupts TLB: 112 85 53 39 658 312 16 33 TLB shootdowns TRM: 0 0 0 0 0 0 0 0 Thermal event interrupts THR: 0 0 0 0 0 0 0 0 Threshold APIC interrupts MCE: 0 0 0 0 0 0 0 0 Machine check exceptions MCP: 6 6 6 6 6 6 6 6 Machine check polls HYP: 0 0 0 0 0 0 0 0 Hypervisor callback interrupts ERR: 10 MIS: 0
Then it changes to msi-x, I'm forcing msi-x interrupts with saa716x_budget int_type=1 in the guest
[root@home-server ~]# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 0: 19 0 0 0 0 0 0 0 IR-IO-APIC-edge timer 1: 3 0 0 0 0 0 0 0 IR-IO-APIC-edge i8042 7: 10 0 0 0 0 0 0 0 IR-IO-APIC-edge 8: 0 0 0 0 1 0 0 0 IR-IO-APIC-edge rtc0 9: 0 0 1 0 2 0 0 0 IR-IO-APIC-fasteoi acpi 12: 2 0 1 0 0 0 1 0 IR-IO-APIC-edge i8042 16: 13 7 0 0 2 6 1 0 IR-IO-APIC 16-fasteoi ehci_hcd:usb5 17: 288441 31873 0 0 0 0 0 0 IR-IO-APIC 17-fasteoi 18: 0 0 0 0 0 0 0 0 IR-IO-APIC 18-fasteoi i801_smbus 23: 28 2 0 0 4 1 0 0 IR-IO-APIC 23-fasteoi ehci_hcd:usb6 24: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar0 25: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar1 26: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 27: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 28: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME, pciehp 29: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 30: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 31: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 32: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 35: 40 0 2 1 12 2 2 2 IR-PCI-MSI-edge xhci_hcd 36: 31 2 3 2 13 3 0 1 IR-PCI-MSI-edge xhci_hcd 37: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 38: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 39: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 40: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 41: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 42: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 43: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 44: 80885 112767 83 67 1826 908 382 88 IR-PCI-MSI-edge 0000:00:1f.2 45: 1 0 1 2 4 5 8 3 IR-PCI-MSI-edge mei_me 46: 16896 88670 8 12 263 163 10 19 IR-PCI-MSI-edge eno1 52: 4 0 172 0 20 1 154 3 IR-PCI-MSI-edge snd_hda_intel 53: 1 0 2 0 5 0 0 0 IR-PCI-MSI-edge i915 54: 0 0 39 1 15 0 1 4 IR-PCI-MSI-edge snd_hda_intel 55: 556 253 0 0 68 25 0 1 IR-PCI-MSI-edge vfio-msi[0](0000:07:00.0) NMI: 1 1 0 0 9 3 0 0 Non-maskable interrupts LOC: 23680 43632 2955 2927 71642 41880 1478 1388 Local timer interrupts SPU: 0 0 0 0 0 0 0 0 Spurious interrupts PMI: 1 1 0 0 9 3 0 0 Performance monitoring interrupts IWI: 2 0 0 0 0 0 0 0 IRQ work interrupts RTR: 0 0 0 0 0 0 0 0 APIC ICR read retries RES: 1647 2052 209 172 68764 19165 88 118 Rescheduling interrupts CAL: 964 968 1622 1654 1666 1461 1640 1640 Function call interrupts TLB: 107 82 46 37 622 305 15 30 TLB shootdowns TRM: 0 0 0 0 0 0 0 0 Thermal event interrupts THR: 0 0 0 0 0 0 0 0 Threshold APIC interrupts MCE: 0 0 0 0 0 0 0 0 Machine check exceptions MCP: 5 5 5 5 5 5 5 5 Machine check polls HYP: 0 0 0 0 0 0 0 0 Hypervisor callback interrupts ERR: 10 MIS: 0
Hi,
I have a TBS 6985 (Quad Satellite card) and after quite a lot of messing about got it running within a VM using the open source driver. I would get heavy pixellation until I disabled all power management in the bios (Disabling within linux didn't work as Turbo modes were still used). Driver info and interrupts below:
modinfo saa716x_budget
filename: /lib/modules/3.2.0-4-amd64/kernel/drivers/media/pci/saa716x/saa716x_budget.ko
license: GPL
author: Manu Abraham
description: SAA716x Budget driver
alias: pci:v00001131d00007160sv000013C2sd00003010bc*sc*i*
alias: pci:v00001131d00007160sv00006985sd00000002bc*sc*i*
alias: pci:v00001131d00007160sv00006985sd00000001bc*sc*i*
alias: pci:v00001131d00007160sv00006984sd00000013bc*sc*i*
alias: pci:v00001131d00007160sv00006982sd00000002bc*sc*i*
alias: pci:v00001131d00007160sv00006982sd00000001bc*sc*i*
alias: pci:v00001131d00007160sv00006925sd00000001bc*sc*i*
alias: pci:v00001131d00007160sv00006922sd00000001bc*sc*i*
alias: pci:v00001131d00007160sv00006220sd00000002bc*sc*i*
alias: pci:v00001131d00007160sv00006285sd00000001bc*sc*i*
alias: pci:v00001131d00007160sv00006281sd00000001bc*sc*i*
alias: pci:v00001131d00007160sv00006280sd00000011bc*sc*i*
alias: pci:v00001131d00007160sv00006284sd00000001bc*sc*i*
alias: pci:v00001131d00007160sv00001AE4sd00000700bc*sc*i*
alias: pci:v00001131d00007160sv00001894sd00000110bc*sc*i*
alias: pci:v00001131d00007160sv00001822sd00000047bc*sc*i*
alias: pci:v00001131d00007160sv00001822sd00000039bc*sc*i*
alias: pci:v00001131d00007160sv00001822sd00000044bc*sc*i*
depends: cx24117,saa716x_core,mb86a16,dvb-core,i2c-core,cxd2820r,tas2101
vermagic: 3.2.0-4-amd64 SMP mod_unload modversions
parm: verbose:verbose startup messages, default is 1 (yes) (int)
parm: int_type:force Interrupt Handler type: 0=INT-A, 1=MSI, 2=MSI-X. default INT-A mode (int)
cat /proc/interrupts
CPU0
0: 59 IO-APIC-edge timer
1: 9 IO-APIC-edge i8042
2: 0 XT-PIC-XT-PIC cascade
8: 0 IO-APIC-edge rtc0
11: 0 XT-PIC-XT-PIC virtio0
12: 142 IO-APIC-edge i8042
40: 1 PCI-MSI-edge pciehp
41: 27657437 PCI-MSI-edge eth0-rx-0
42: 22435145 PCI-MSI-edge eth0-tx-0
43: 12 PCI-MSI-edge eth0:mbx
44: 43260 PCI-MSI-edge ahci
45: 102414501 PCI-MSI-edge SAA716x Core
NMI: 0 Non-maskable interrupts
LOC: 50181720 Local timer interrupts
SPU: 0 Spurious interrupts
PMI: 0 Performance monitoring interrupts
IWI: 0 IRQ work interrupts
RES: 0 Rescheduling interrupts
CAL: 0 Function call interrupts
TLB: 0 TLB shootdowns
TRM: 0 Thermal event interrupts
THR: 0 Threshold APIC interrupts
MCE: 0 Machine check exceptions
MCP: 6555 Machine check polls
ERR: 0
MIS: 0
VM Kernel:
uname -r
3.2.0-4-amd64
Host Kernel:
uname -r
3.18.5-1-ARCH
VM Config:
cat VM/TVHeadend.xml
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>TVHeadend</name>
<uuid>f702c5eb-83d4-4b50-b909-8da878e08d37</uuid>
<memory unit='KiB'>1036288</memory>
<currentMemory unit='KiB'>1036288</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='q35'>hvm</type>
<loader>/usr/share/qemu/bios.bin</loader>
<boot dev='hd'/>
<bootmenu enable='yes'/>
</os>
<features>
<acpi/>
</features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/home/VM/TVHeadend.img'/>
<target dev='sda' bus='sata'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/home/ISO/debian-7.7.0-amd64-netinst.iso'/>
<target dev='sdb' bus='sata'/>
<readonly/>
</disk>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1' model='dmi-to-pci-bridge'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
</controller>
<controller type='pci' index='2' model='pci-bridge'>
<address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
</controller>
<graphics type='vnc' port='5900' />
</devices>
<qemu:commandline>
<qemu:arg value='-device'/>
<qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=09:11.2'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=08:00.0,id=net10'/>
</qemu:commandline>
</domain>
Last edited by Krobar (2015-02-23 07:52:27)
Offline
aw wrote:aw wrote:You should not need to touch /etc/libvirt/qemu.conf
Without touching user, group:
$ virsh start Win81 error: Failed to start domain Win81 error: Requested operation is not valid: PCI device 0000:01:00.0 is not assignable # virsh start Win81 error: Failed to start domain Win81 error: internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied failed to initialize KVM: Permission denied
After changing user and group to root, I can use my vm as root, on user still same error.
Btw, forgot to ask... I have 'The drivers for this device are not installed.' on SCSI Controller in Windows 8, all the time...
PCI\VEN_1000&DEV_0012&SUBSYS_10000000&REV_00
Where can I get this drivers?Can I catch you somewhere on IRC, aw?
Check this https://bbs.archlinux.org/viewtopic.php?id=69454, it could be relevant to your permission errors
Offline
<qemu:commandline>
<qemu:arg value='-device'/>
<qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=09:11.2'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=08:00.0,id=net10'/>
</qemu:commandline>
</domain>
Two points:
1. every time someone forgets to use [code] BBCode, God kills a kitten
2. do not use "<qemu:arg ", you are only missing libvirt capability to manage devices for you
Offline
bpbastos wrote:aw wrote:The nointxmask won't have any effect if MSI-X is actually being used. Is MSI-X being used by the device when it's assigned? (host: grep vfio /proc/interrupts) If not, the better option would be to try to make it use MSI-X. If it's a Windows guest, see http://vfio.blogspot.com/2014/09/vfio-i … ndows.html If it is using MSI-X already, then I'm not sure what to suggest. We've seen cards like Nvidia that actually require a PCI config space write to re-enable MSI and needs a quirk to do so because it writes to a read-only offset.
It's a Linux guest (Ubuntu 14.10), this card seems to have a lot of problems with systems where iommu is enabled, see https://github.com/ljalves/linux_media/issues/66
My card is a TBS6285 v21M like the one on the link above and it has the pericom pci bridge which seems to be the root cause of the problems.
I've already tried to passthrough the pericom pci bridge but i think its not possible to passthrough pci bridges.
When the guest starts, it starts with intx:
[root@home-server ~]# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 0: 19 0 0 0 0 0 0 0 IR-IO-APIC-edge timer 1: 3 0 0 0 0 0 0 0 IR-IO-APIC-edge i8042 7: 10 0 0 0 0 0 0 0 IR-IO-APIC-edge 8: 0 0 0 0 1 0 0 0 IR-IO-APIC-edge rtc0 9: 0 0 1 0 2 0 0 0 IR-IO-APIC-fasteoi acpi 12: 2 0 1 0 0 0 1 0 IR-IO-APIC-edge i8042 16: 13 7 0 0 2 6 1 0 IR-IO-APIC 16-fasteoi ehci_hcd:usb5 17: 288441 31873 0 0 0 0 0 0 IR-IO-APIC 17-fasteoi vfio-intx(0000:07:00.0) 18: 0 0 0 0 0 0 0 0 IR-IO-APIC 18-fasteoi i801_smbus 23: 28 2 0 0 4 1 0 0 IR-IO-APIC 23-fasteoi ehci_hcd:usb6 24: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar0 25: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar1 26: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 27: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 28: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME, pciehp 29: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 30: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 31: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 32: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 35: 40 0 2 1 12 2 2 2 IR-PCI-MSI-edge xhci_hcd 36: 31 2 3 2 13 3 0 1 IR-PCI-MSI-edge xhci_hcd 37: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 38: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 39: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 40: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 41: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 42: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 43: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 44: 80885 118083 83 67 1826 908 382 88 IR-PCI-MSI-edge 0000:00:1f.2 45: 1 0 1 2 4 5 8 3 IR-PCI-MSI-edge mei_me 46: 16896 89344 8 12 263 163 10 19 IR-PCI-MSI-edge eno1 52: 4 0 172 0 20 1 154 3 IR-PCI-MSI-edge snd_hda_intel 53: 1 0 2 0 5 0 0 0 IR-PCI-MSI-edge i915 54: 0 0 39 1 15 0 1 4 IR-PCI-MSI-edge snd_hda_intel NMI: 1 1 0 0 10 3 0 0 Non-maskable interrupts LOC: 25166 45620 3162 3118 77738 45167 1567 1477 Local timer interrupts SPU: 0 0 0 0 0 0 0 0 Spurious interrupts PMI: 1 1 0 0 10 3 0 0 Performance monitoring interrupts IWI: 2 0 0 0 0 0 0 0 IRQ work interrupts RTR: 0 0 0 0 0 0 0 0 APIC ICR read retries RES: 1660 2067 219 179 71690 20139 91 124 Rescheduling interrupts CAL: 988 994 1648 1680 1692 1463 1664 1664 Function call interrupts TLB: 112 85 53 39 658 312 16 33 TLB shootdowns TRM: 0 0 0 0 0 0 0 0 Thermal event interrupts THR: 0 0 0 0 0 0 0 0 Threshold APIC interrupts MCE: 0 0 0 0 0 0 0 0 Machine check exceptions MCP: 6 6 6 6 6 6 6 6 Machine check polls HYP: 0 0 0 0 0 0 0 0 Hypervisor callback interrupts ERR: 10 MIS: 0
Then it changes to msi-x, I'm forcing msi-x interrupts with saa716x_budget int_type=1 in the guest
[root@home-server ~]# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 0: 19 0 0 0 0 0 0 0 IR-IO-APIC-edge timer 1: 3 0 0 0 0 0 0 0 IR-IO-APIC-edge i8042 7: 10 0 0 0 0 0 0 0 IR-IO-APIC-edge 8: 0 0 0 0 1 0 0 0 IR-IO-APIC-edge rtc0 9: 0 0 1 0 2 0 0 0 IR-IO-APIC-fasteoi acpi 12: 2 0 1 0 0 0 1 0 IR-IO-APIC-edge i8042 16: 13 7 0 0 2 6 1 0 IR-IO-APIC 16-fasteoi ehci_hcd:usb5 17: 288441 31873 0 0 0 0 0 0 IR-IO-APIC 17-fasteoi 18: 0 0 0 0 0 0 0 0 IR-IO-APIC 18-fasteoi i801_smbus 23: 28 2 0 0 4 1 0 0 IR-IO-APIC 23-fasteoi ehci_hcd:usb6 24: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar0 25: 0 0 0 0 0 0 0 0 DMAR_MSI-edge dmar1 26: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 27: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 28: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME, pciehp 29: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 30: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 31: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 32: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge PCIe PME 35: 40 0 2 1 12 2 2 2 IR-PCI-MSI-edge xhci_hcd 36: 31 2 3 2 13 3 0 1 IR-PCI-MSI-edge xhci_hcd 37: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 38: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 39: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 40: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 41: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 42: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 43: 0 0 0 0 0 0 0 0 IR-PCI-MSI-edge xhci_hcd 44: 80885 112767 83 67 1826 908 382 88 IR-PCI-MSI-edge 0000:00:1f.2 45: 1 0 1 2 4 5 8 3 IR-PCI-MSI-edge mei_me 46: 16896 88670 8 12 263 163 10 19 IR-PCI-MSI-edge eno1 52: 4 0 172 0 20 1 154 3 IR-PCI-MSI-edge snd_hda_intel 53: 1 0 2 0 5 0 0 0 IR-PCI-MSI-edge i915 54: 0 0 39 1 15 0 1 4 IR-PCI-MSI-edge snd_hda_intel 55: 556 253 0 0 68 25 0 1 IR-PCI-MSI-edge vfio-msi[0](0000:07:00.0) NMI: 1 1 0 0 9 3 0 0 Non-maskable interrupts LOC: 23680 43632 2955 2927 71642 41880 1478 1388 Local timer interrupts SPU: 0 0 0 0 0 0 0 0 Spurious interrupts PMI: 1 1 0 0 9 3 0 0 Performance monitoring interrupts IWI: 2 0 0 0 0 0 0 0 IRQ work interrupts RTR: 0 0 0 0 0 0 0 0 APIC ICR read retries RES: 1647 2052 209 172 68764 19165 88 118 Rescheduling interrupts CAL: 964 968 1622 1654 1666 1461 1640 1640 Function call interrupts TLB: 107 82 46 37 622 305 15 30 TLB shootdowns TRM: 0 0 0 0 0 0 0 0 Thermal event interrupts THR: 0 0 0 0 0 0 0 0 Threshold APIC interrupts MCE: 0 0 0 0 0 0 0 0 Machine check exceptions MCP: 5 5 5 5 5 5 5 5 Machine check polls HYP: 0 0 0 0 0 0 0 0 Hypervisor callback interrupts ERR: 10 MIS: 0
Hi,
I have a TBS 6985 (Quad Satellite card) and after quite a lot of messing about got it running within a VM using the open source driver. I would get heavy pixellation until I disabled all power management in the bios (Disabling within linux didn't work as Turbo modes were still used). Driver info and interrupts below:
Thanks @Krobar.
I've tried to disable power management settings like you suggested but unfortunately it didn't solve my problem.
Offline
Duelist wrote:http://www.insanelymac.com/forum/topic/ … ati-cards/
Based on this thread, i've created my own, handmade ROM from legacy HD7750's ROM and HD6450's GOP EFI part.
And it boots with OVMF. Creepy stuff.UPD: Win7 installer froze after boot logo animation, win8 goes fine.
UPD2: Driver install went well. Benchmarking time!
If you want my ROM - I can send it.Thanks a lot for this message! I've managed to make my own rom. Since I liked the latest vbios for my 7750, which is a bit overclocked compared to the original, I decided to replace only the buggy GOP part. And it even works! I can boot systemrescuecd in pure EFI mode. Using DRI freezes the VM, though (not that I care at this moment).
P.S. Installing Windows on UEFI is such a pain. :x
Forget all that crap you have with filesystems.
Check out how it's really done:
-device ahci \
-device virtio-scsi-pci \
-device scsi-cd,drive=install \
-device ide-cd,bus=ide.1,drive=virtiocd \
-drive file=/mnt/hdd/qemu/windows8.iso,id=install,if=none \
-drive file=/mnt/hdd/qemu/virtio.iso,id=virtiocd,if=none \
I don't recall which(ahci or virtio-scsi-pci) controller controls the scsi-cd, but since we don't need supa-dupa-high-performance and we need this to run the install cd only once - try adding both, qemu will sort it out for you.
Connecting disks that way works, but you must use windows 8 system, because win7 fails to work with GOP, halting in another dead loop somewhere. I might do some additional testing with gigabyte GT610 uefi-compliant card and windows7 much later, just for fun.
Please note that i am specifically using -M pc and not Q35.
Regarding the ROM stuff - the AMD GOP is almost universal. It's just some revision of it that is broken. As you can see, using the older part from HD6450 actually helps. So you may use ANY BIOS for your HD7XXX card, especially if you want to tinker with voltages, power limits and clocks and stuff.
But beware - to do any actual harm tweaking to your GPU you must use windows, since VBE7 is written only for windows, atiwinflash is only for windows and various other stuff is only for windows. I have windowns 7 system installed on bare metal somewhere on the hard drive just for my own comfort.
Right now i have windowns 8 installed and directx9-11 and opengl works fine showing almost zero performance drawbacks, HOWEVER seems like there's still some issues left, as i'm getting half the framerate in some old and buggy(it has bugs under windows too) games like rfactor.
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
@nbhs
Add info on first page, might help some people...
How can I run virtual machine on normal user using libvirt:
- start libvirtd process on root user (systemd)
- path to bios files have to be executable, readable
- /etc/libvirt/libvirtd.conf (this one is working for me)
unix_sock_group = "libvirt"
unix_sock_ro_perms = "0777"
unix_sock_rw_perms = "0770"
unix_sock_dir = "/var/run/libvirt"
auth_unix_ro = "none"
auth_unix_rw = "none"
- /etc/libvirt/qemu.conf
in my case is blank.
- starting vm on normal user: virsh -c qemu:///system start ...
If it was somewhere in this thread, I must missed it.
Thanks aw & laine for help!
Last edited by Len (2015-02-23 18:06:25)
Offline
[Forget all that crap you have with filesystems.
Check out how it's really done:
I was going to say I'd already tried that, but decided to give it another chance. Guess what? By pure luck I found a working combination: my fat32 partition mounted as scsi-disk AND my udf iso mounted as scsi-cdrom. Only when I connected both disks, installation started. Just to remind what goes wrong in other setups: the fat32 partition alone won't launch because of the "no mapping" error; the udf iso is simply not supported by ovmf (yet). There are patches that add UDF support on ovmf's ml.
Anyway, now I have Windows 8.1 and I'm a happy panda. I've just run the Unigine Valley benchmark. It works. Pure EFI. I haven't noticed any issues. On the contrary, this setup somehow feels snappier than my Win7 VM.
Meanwhile I noticed that the standard video card driver (i.e. the driver used by qxl) in Win8 supports fancy effects like transparency. It isn't the case in Win7. Also, I can have both qxl and the passed through GPU work together. Each device gets its own screen. Nice!
P.S. Don't know why, but a clean install of Win8 takes two times less space than a clean install of Win7 (with updates).
LV VG Attr LSize Pool Origin Data%
win7-clean vg0 Vwi-a-tz-- 50.00g thin-pool1 33.44
win81-clean vg0 Vwi-a-tz-- 50.00g thin-pool1 win81 15.89
Offline
instantepiphany wrote:I am not using arch currently, but this is the best resource I could find with regards to vga passthrough on QEMU.
I have gotten everything working so far, except actual passthrough. When I run my vm, I hear the graphics card that I am passing through spin up like it does on boot, but when I switch to the input from that card, there is no display. What could be causing this?Edit: And, in the original guide (which is a few years old now) it says you need seabios - but I cant see any commands that link to it or ask QEMU to use it in the OP, does qemu automatically detect that seabios is installed and use it ?
Don't bother with a -bios option, those instructions are outdated.
Thanks, I thought it might be outdated.
Looks like the "other" vga arbiter patch is for me, as I am using 2 amd cards rather than intel IGP + dedicated card, and my host graphics don't get corrupted. I haven't applied a patch to the kernel before (though I have applied patches to other code), is there any thing I need be aware of in terms of kernel version? I am currently using 3.18.5, will the patch break anything with my kernel?
Offline
If 440fx and -nographic don't help and you're looking at the right output from the GPU, I'd next be suspicious of the ROM file. It looks like one from techpowerup. Does it actually match your card? Can you dump the ROM from your card instead? Do you even need a dump of the ROM?
hi sir aw.. i tried downloading various ROMs from other sites too, but none of them seems to get me working, they still gave me black screen output on the sscreen... and it seemed to be hard to find nvidia's ROM corresponding on that... so is it okay if i change into another GPU card? will it help me to work?
That black window is the sdl graphics head for the VM which appears because you haven't used the -nographic option. The GPU output should be on a monitor connected to the assigned GPU. I'd also recommend, like I almost always do, using 440fx rather than q35 for the VM. It looks like you're using a Linux guest, but afaik, the nvidia driver does not have an issue with PCIe topology in Linux (until you get to lots of GPUs and that may already be fixed too).
and also about this part... i actually still confused, after some reading and stuff, i redone the steps from nbhs's page one, after making the single script and others.. i still see the black qemu command line window when adding -vga none... and also without a rom setting, i also tried rombar=0 option and -nographic still didnt give me output.. can you give me further explanation on this.. ?? i am very confused about the black qemu command line, and how does people use -vga none without -nographics to go straight to the VMS without the black qemu command line?
Edit : i tried adding -curses instead of -nographics, and its still giving me blank output, which i can type "quit" and i can go back to the qemu, which is that i am guessing that is still the black qemu command line output again.. removing that -vga none boots -curses to the VM.. so is the black qemu command line from the -vga none output is showing because of my GPU rom incorrect? or am i missing something..?
on this case, i tried to extract the ROM of my own GTX560Ti GPU, and i used it to launch my VMs, as the same that using -nographic and -vga none gives no output, any help on this anyone?
also i tried to put the romfile= option in the q35 machine ( becuase 440fx didn't work for me ) and i put my extracted rom from my GPU to the path, it still give me a same result instead.. -vga none still give me qemu command line monitor, adding -vga none and -nographics shows no output, and also if i remove -vga none and qemu command in q35 script, i can boot inside the VM, but it looks like the GPU is not utilized properly.. it shows in lspci in the linux, but the GPU passthrough didn't work, as i test opening youtube and it lags, and also tried unigine heaven benchmark and it still wont work, glx errors.. and also when i boot into windows 8, and adding kvm=off after -cpu argument, it won't let me boot in, soon after i log in into my account, its having an error_exception which keep restarts...
can someone help me on this.. i've been stuck here for 2 months and i am hoping this to work
Offline
I am having a terrible time getting audio working in a Windows 8.1 VM with qemu...
PCI passthrough is working perfectly with Radeon GPU, motherboard's 2nd ethernet port, and motherboard's 2nd SATA controller being passed to the VM. The last piece I need is working audio!
To try to enable sound (with pulseaudio used on host), I am doing qemu.sh:
export QEMU_AUDIO_DRV=pa
exec qemu-system-x86_64 \
-enable-kvm \
...... \
-soundhw hda
,
and the VM fails to launch, with dmesg showing:
[79307.989184] kvm [22292]: vcpu0 unhandled rdmsr: 0xce
[79307.993410] kvm [22292]: vcpu0 unhandled rdmsr: 0x637
[79307.993418] kvm [22292]: vcpu0 unhandled rdmsr: 0xe8
[79307.993422] kvm [22292]: vcpu0 unhandled rdmsr: 0xe7
[79307.993426] kvm [22292]: vcpu0 unhandled rdmsr: 0x31
[79307.993430] kvm [22292]: vcpu0 unhandled rdmsr: 0x35
[79307.993434] kvm [22292]: vcpu0 unhandled rdmsr: 0x39
[79307.993448] kvm [22292]: vcpu0 unhandled rdmsr: 0xce
[79307.993451] kvm [22292]: vcpu0 unhandled rdmsr: 0x194
[79307.993454] kvm [22292]: vcpu0 unhandled rdmsr: 0x19a
[79313.196146] kvm_get_msr_common: 170 callbacks suppressed
[79313.196149] kvm [22292]: vcpu0 unhandled rdmsr: 0x150
[79313.196156] kvm [22292]: vcpu0 unhandled rdmsr: 0x150
[79313.196158] kvm [22292]: vcpu0 unhandled rdmsr: 0x150
[79313.196161] kvm [22292]: vcpu0 unhandled rdmsr: 0x150
[79313.205095] kvm [22292]: vcpu3 unhandled rdmsr: 0x150
[79313.205102] kvm [22292]: vcpu3 unhandled rdmsr: 0x150
[79313.205105] kvm [22292]: vcpu3 unhandled rdmsr: 0x150
[79313.205107] kvm [22292]: vcpu3 unhandled rdmsr: 0x150
[79313.214116] kvm [22292]: vcpu1 unhandled rdmsr: 0x150
[79313.214123] kvm [22292]: vcpu1 unhandled rdmsr: 0x150
[79318.241747] kvm_get_msr_common: 70 callbacks suppressed
...
...
...
[79950.317052] vfio-pci 0000:02:00.1: Refused to change power state, currently in D3
[79950.317119] vfio_pci_disable: Failed to reset device 0000:02:00.1 (-22)
[79950.328050] vfio-pci 0000:02:00.1: Refused to change power state, currently in D3
[84325.855696] vfio-pci 0000:02:00.0: enabling device (0400 -> 0403)
[84325.876928] vfio_ecap_init: 0000:02:00.0 hiding ecap 0x19@0x270
[84325.876931] vfio_ecap_init: 0000:02:00.0 hiding ecap 0x1b@0x2d0
[84325.878188] vfio-pci 0000:02:00.1: enabling device (0400 -> 0402)
[84325.900537] vfio-pci 0000:04:00.0: enabling device (0400 -> 0403)
[84326.906061] vfio-pci 0000:07:00.0: enabling device (0400 -> 0403)
[84330.202221] kvm: zapping shadow pages for mmio generation wraparound
[84338.019479] intel_iommu_map: iommu width (39) is not sufficient for the mapped address (c1f400001000)
Any insight into what I am experience? Thanks!
Offline