[vfio-users] VFIO PCI passthrough problems booting VM

Blank Field ihatethisfield at gmail.com
Sat Sep 12 04:55:37 UTC 2015


Who told you to add that "allow_unsafe_interrupts"?

The problem you have is rather obvious: you have an ethernet controller in
your iommu group and you need it to be bound to the vfio-pci driver too.
But you don't want to do that.
You can try patching your kernel with the ACS patch and then those command
line options start to work, but i doubt that this will help.
Since your device doesn't need to work with VGA, you can try using legacy
pci-assign: it doesn't care about IOMMU groups.
That's the only solution i see.
On Sep 12, 2015 6:42 AM, "Phill Edwards" <philledwards at gmail.com> wrote:

> I'm running a CentOS 7.1 KVM hypervisor with kernel 3.10.0-229.el7.x86_6
> and trying to pass through a DVB-T card to a VM. But every time I try to
> start the VM with virt-manager I get this error:
>
> Error starting domain: internal error: process exited while connecting to
> monitor: 2015-09-10T01:15:53.633408Z qemu-kvm: -device
> vfio-pci,host=05:02.0,id=hostdev0,bus=pci.0,addr=0x9: vfio: error, group 11
> is not viable, please ensure all devices within the iommu_group are bound
> to their vfio bus driver.
> 2015-09-10T01:15:53.633447Z qemu-kvm: -device
> vfio-pci,host=05:02.0,id=hostdev0,bus=pci.0,addr=0x9: vfio: failed to get
> group 11
> 2015-09-10T01:15:53.633463Z qemu-kvm: -device
> vfio-pci,host=05:02.0,id=hostdev0,bus=pci.0,addr=0x9: Device initialization
> failed.
> 2015-09-10T01:15:53.633479Z qemu-kvm: -device
> vfio-pci,host=05:02.0,id=hostdev0,bus=pci.0,addr=0x9: Device 'vfio-pci'
> could not be initialized
>
> I understand the problem is that I have multiple PCI devices in group 11:
> # find /sys/kernel/iommu_groups/ -type l
> /sys/kernel/iommu_groups/0/devices/0000:00:00.0
> /sys/kernel/iommu_groups/1/devices/0000:00:02.0
> /sys/kernel/iommu_groups/2/devices/0000:00:16.0
> /sys/kernel/iommu_groups/2/devices/0000:00:16.3
> /sys/kernel/iommu_groups/3/devices/0000:00:19.0
> /sys/kernel/iommu_groups/4/devices/0000:00:1a.0
> /sys/kernel/iommu_groups/5/devices/0000:00:1b.0
> /sys/kernel/iommu_groups/6/devices/0000:00:1c.0
> /sys/kernel/iommu_groups/7/devices/0000:00:1c.4
> /sys/kernel/iommu_groups/8/devices/0000:00:1c.6
> /sys/kernel/iommu_groups/9/devices/0000:00:1c.7
> /sys/kernel/iommu_groups/10/devices/0000:00:1d.0
> /sys/kernel/iommu_groups/11/devices/0000:00:1e.0
> /sys/kernel/iommu_groups/11/devices/0000:05:00.0
> /sys/kernel/iommu_groups/11/devices/0000:05:00.1
> /sys/kernel/iommu_groups/11/devices/0000:05:02.0
> /sys/kernel/iommu_groups/11/devices/0000:05:02.2
> /sys/kernel/iommu_groups/12/devices/0000:00:1f.0
> /sys/kernel/iommu_groups/12/devices/0000:00:1f.2
> /sys/kernel/iommu_groups/12/devices/0000:00:1f.3
>
> My DVB-T card has 2 PCI IDs: 0000:05:02.0 and 0000:05:02.2. Output of
> lspci command follows:
>
> # lspci -nnk
> 00:00.0 Host bridge [0600]: Intel Corporation 2nd Generation Core
> Processor Family DRAM Controller [8086:0100] (rev 09)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
> 00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation
> Core Processor Family Integrated Graphics Controller [8086:0102] (rev 09)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
>         Kernel driver in use: i915
> 00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200
> Series Chipset Family MEI Controller #1 [8086:1c3a] (rev 04)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
>         Kernel driver in use: mei_me
> 00:16.3 Serial controller [0700]: Intel Corporation 6 Series/C200 Series
> Chipset Family KT Controller [8086:1c3d] (rev 04)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
>         Kernel driver in use: serial
> 00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit
> Network Connection [8086:1502] (rev 04)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
>         Kernel driver in use: e1000e
> 00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series
> Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 04)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
>         Kernel driver in use: ehci-pci
> 00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series
> Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
>         Kernel driver in use: snd_hda_intel
> 00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset
> Family PCI Express Root Port 1 [8086:1c10] (rev b4)
>         Kernel driver in use: pcieport
> 00:1c.4 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset
> Family PCI Express Root Port 5 [8086:1c18] (rev b4)
>         Kernel driver in use: pcieport
> 00:1c.6 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset
> Family PCI Express Root Port 7 [8086:1c1c] (rev b4)
>         Kernel driver in use: pcieport
> 00:1c.7 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset
> Family PCI Express Root Port 8 [8086:1c1e] (rev b4)
>         Kernel driver in use: pcieport
> 00:1d.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series
> Chipset Family USB Enhanced Host Controller #1 [8086:1c26] (rev 04)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
>         Kernel driver in use: ehci-pci
> 00:1e.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e]
> (rev a4)
> 00:1f.0 ISA bridge [0601]: Intel Corporation Q67 Express Chipset Family
> LPC Controller [8086:1c4e] (rev 04)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
>         Kernel driver in use: lpc_ich
> 00:1f.2 SATA controller [0106]: Intel Corporation 6 Series/C200 Series
> Chipset Family SATA AHCI Controller [8086:1c02] (rev 04)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
>         Kernel driver in use: ahci
> 00:1f.3 SMBus [0c05]: Intel Corporation 6 Series/C200 Series Chipset
> Family SMBus Controller [8086:1c22] (rev 04)
>         Subsystem: Hewlett-Packard Company Device [103c:1494]
>         Kernel driver in use: i801_smbus
> 05:00.0 Ethernet controller [0200]: Intel Corporation 82546EB Gigabit
> Ethernet Controller (Copper) [8086:1010] (rev 01)
>         Subsystem: Compaq Computer Corporation NC7170 Gigabit Server
> Adapter [0e11:00db]
>         Kernel driver in use: e1000
> 05:00.1 Ethernet controller [0200]: Intel Corporation 82546EB Gigabit
> Ethernet Controller (Copper) [8086:1010] (rev 01)
>         Subsystem: Compaq Computer Corporation NC7170 Gigabit Server
> Adapter [0e11:00db]
>         Kernel driver in use: e1000
> 05:02.0 Multimedia video controller [0400]: Conexant Systems, Inc.
> CX23880/1/2/3 PCI Video and Audio Decoder [14f1:8800] (rev 05)
>         Subsystem: KWorld Computer Co. Ltd. KWorld/VStream XPert DVB-T
> [17de:08a6]
> 05:02.2 Multimedia controller [0480]: Conexant Systems, Inc. CX23880/1/2/3
> PCI Video and Audio Decoder [MPEG Port] [14f1:8802] (rev 05)
>         Subsystem: KWorld Computer Co. Ltd. KWorld/VStream XPert DVB-T
> [17de:08a6]
>
>
> I've been reading some of the posts at http://vfio.blogspot.com.au/ and
> added this to GRUB_CMDLINE_LINUX in /etc/sysconfig/grub:
> iommu=pt intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1
> pci-stub.ids=14f1:8802,14f1:8800.
>
> Unfortunately I still can't get the VM to start so obviously what I added
> to the kernel command line didn't work.
>
> I've also tried adding these options to GRUB_CMDLINE_LINUX but these
> result in the same error when starting the VM:
> iommu=pt intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1
> pcie_acs_override=id:14f1:8802
>
>    and
>
> iommu=pt intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1
> pcie_acs_override=downstream
>
>
> I thought one of these would fix it but I just cannot get it working. Can
> anyone please give me some pointers as to what I'm doing wrong here?
>
> Thanks in advance.
>
>
>
>
>
> _______________________________________________
> vfio-users mailing list
> vfio-users at redhat.com
> https://www.redhat.com/mailman/listinfo/vfio-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20150912/af24f38e/attachment.htm>


More information about the vfio-users mailing list