[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [vfio-users] can't get my video card to connect to my vm



Thanks that got me a bit further. 
 dmesg | grep AMD-Vi
[    0.233077] [Firmware Bug]: AMD-Vi: IOAPIC[9] not in IVRS table
[    0.233083] [Firmware Bug]: AMD-Vi: IOAPIC[10] not in IVRS table
[    0.233087] [Firmware Bug]: AMD-Vi: No southbridge IOAPIC found
[    0.233090] AMD-Vi: Disabling interrupt remapping
[    1.901086] AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40
[    1.917421] AMD-Vi: Lazy IO/TLB flushing enabled

Any starting point where I can find info on how to get iommu remapping in my kernel?

Op 7 mrt. 2016 om 18:48 heeft Alex Williamson <alex l williamson gmail com> het volgende geschreven:

On Mon, Mar 7, 2016 at 10:34 AM, Stein van Broekhoven <stein aapjeisbaas nl> wrote:
Dear All,

I can't get the video card which is using vfio to connect to my vm:
lspci -nnk
06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Turks XT [Radeon HD 6670/7670] [1002:6758]
        Subsystem: ASUSTeK Computer Inc. Device [1043:03ea]
        Kernel driver in use: vfio-pci
        Kernel modules: radeon, fglrx
06:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Turks/Whistler HDMI Audio [Radeon HD 6000 Series] [1002:aa90]
        Subsystem: ASUSTeK Computer Inc. Device [1043:aa90]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel

I start the vm from cli with qemu command with sudo
The devices 06:00.0 and 06:00.1 are together in group 22
I added /dev/vfio/22 to acl in qemu config

You should never need to touch this acl list, besides it's for libvirt which you're not using if you're using the qemu command.
 
When using vfio_iommu_type1.allow_unsafe_interrupts=1 on start vm I get the error:
stdout:
qemu-system-x86_64: -device vfio-pci,host=06:00.0,addr=09.0,multifunction=on: vfio: Error: Failed to setup INTx fd: Device or resource busy
qemu-system-x86_64: -device vfio-pci,host=06:00.0,addr=09.0,multifunction=on: Device initialization failed
dmesg:
genirq: Flags mismatch irq 55. 00000080 (vfio-intx(0000:06:00.0)) vs. 00000800 (fglrx[1] PCI:6:0:0)

Without vfio_iommu_type1.allow_unsafe_interrupts=1 on start vm I get the error:
stdout:
vfio: failed to set iommu for container: Operation not permitted
dmesg:
vfio_iommu_type1_attach_group: No interrupt remapping support.  Use the module param "allow_unsafe_interrupts" to enable VFIO IOMMU support on this platform

system:
sabertooth 990FX v1.1
AMD FX-8120
main GPU: Radeon HD 5xxx
VM GPU: Radeon HD 6xxx
Manjaro (arch) kernel 4.1

looks like fglrx is still holding onto the IRQ and there's a flags mismatch, you should prevent fglrx from claiming the GPU by using pci-stub or vfio-pci to claim the device directly.  990FX should support interrupt remapping, so it's likely not enabled in your kernel. 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]