Bug 1540964
| Summary: | Booting guest with q35 multifuction, vIOMMU and device assignment, then dpdk's testpmd will show "VFIO group is not viable!" | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Pei Zhang <pezhang> |
| Component: | qemu-kvm-rhev | Assignee: | Amnon Ilan <ailan> |
| Status: | CLOSED WONTFIX | QA Contact: | Pei Zhang <pezhang> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.5 | CC: | ailan, alex.williamson, chayang, hhuang, juzhang, marcel, maxime.coquelin, michen, peterx, siliu, virt-maint |
| Target Milestone: | rc | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-07-19 18:44:40 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1558351 | ||
|
Description
Pei Zhang
2018-02-01 12:16:52 UTC
The devices are not viable because after specifying multi-function for the pcie root ports, I see that all the pcie root port (including their downstream devices) are put into the same IOMMU group 2:
[root@bootp-73-75-70 ~]# lspci -tv
-[0000:00]-+-00.0 Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
+-01.0 Device 1234:1111
+-02.0-[01]----00.0 Intel Corporation Ethernet Controller 10-Gigabit X540-AT2
+-02.1-[02]----00.0 Intel Corporation Ethernet Controller 10-Gigabit X540-AT2
+-02.2-[03]----00.0 Red Hat, Inc. Virtio network device
+-02.3-[04]----00.0 Red Hat, Inc. Virtio block device
+-1f.0 Intel Corporation 82801IB (ICH9) LPC Interface Controller
+-1f.2 Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode]
\-1f.3 Intel Corporation 82801I (ICH9 Family) SMBus Controller
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:00:00.0 to group 0
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:00:01.0 to group 1
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:00:02.0 to group 2
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:00:02.1 to group 2
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:00:02.2 to group 2
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:00:02.3 to group 2
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:00:1f.0 to group 3
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:00:1f.2 to group 3
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:00:1f.3 to group 3
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:01:00.0 to group 2
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:02:00.0 to group 2
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:03:00.0 to group 2
Feb 02 14:40:14 localhost.localdomain kernel: iommu: Adding device 0000:04:00.0 to group 2
Since there are devices that are still drived by kernel drivers in IOMMU group 2, so these two ixgbe devices are not viable to be assigned to DPDK, which is what the error is talking about.
If not using multi-function pcie root ports, each pcie-root-port (along with its downstream device) will be setup with its own IOMMU group.
Marcel, do you know why this happened?
(CCing Alex too)
Peter
(In reply to Peter Xu from comment #2) > Marcel, do you know why this happened? > > (CCing Alex too) There's no ACS on the emulated root ports, this not only means that all devices downstream of the root port will be grouped together, but also that any root ports (or other devices) which are part of a multifunction slot are also grouped together, as are all downstream devices from those ports. The root ports can be split into separate slots to avoid this. (In reply to Alex Williamson from comment #3) > (In reply to Peter Xu from comment #2) > > Marcel, do you know why this happened? > > > > (CCing Alex too) > > There's no ACS on the emulated root ports, this not only means that all > devices downstream of the root port will be grouped together, but also that > any root ports (or other devices) which are part of a multifunction slot are > also grouped together, as are all downstream devices from those ports. The > root ports can be split into separate slots to avoid this. I proposed a GSOC project to implement ACS emulation for generic PCIe Root Ports. We can use your scenario as a reference point. Thanks, Marcel Thanks Alex, Marcel. Let's avoid using multi-function when we need separate IOMMU groups, or we need to wait until the project that Marcel mentioned on ACS emulation. According to above, I'm closing this one. Peter *** Bug 1526948 has been marked as a duplicate of this bug. *** The current status: if a user needs to have assigned device to Guest userspace (which requires vIOMMU) then he cannot use multi-function root-ports - a slot on bus0, for which we want to put the assigned device, will have only a single root port (i.e. cannot use "multi-function=on" in the QEMU command line for it). |