Bug 1364035
Summary: | [ppc64le][VFIO]Qemu complains:vfio_dma_map(0x10033d3a980, 0x1f34f0000, 0x10000, 0x3fff9a6d0000) = -6 (No such device or address) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Zhengtong <zhengtli> |
Component: | qemu-kvm-rhev | Assignee: | David Gibson <dgibson> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 7.3 | CC: | hannsj_uhl, knoel, lagarcia, michen, qzhang, virt-maint, xuhan, zhengtli |
Target Milestone: | rc | Keywords: | Regression |
Target Release: | 7.3 | ||
Hardware: | ppc64le | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-rhev-2.6.0-22.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-07 21:28:52 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: | 1213667 | ||
Bug Blocks: | 1288337, 1359843 |
Description
Zhengtong
2016-08-04 10:56:50 UTC
x86 guys have helping me to check out that this issue can't be reproduce on x86 platform. I have checked that this issue can't happened on qemu-kvm-rhev-2.6.0-14.el7, and start to happen from version qemu-kvm-rhev-2.6.0-15.el7. So this bug is a regression bug. What sort of device was passed through with VFIO? Have you tried this with multiple types of device or just one? Please include the output from lspci on the host. This could be a bug in qemu, but it could also be a missing quirk specific to the device in the host kernel. The device I passed to guest is BCM5719. In my previous test, I only tested with this device. I tried with USB controller just now, I hit the same problem. qemu give the error msg, too " ... VFIO_MAP_DMA: -6 vfio_dma_map(0x10017a7c900, 0x1fda70000, 0x10000, 0x3fffa8080000) = -6 (No such device or address) VFIO_MAP_DMA: -6 vfio_dma_map(0x10017a7c900, 0x1fda80000, 0x10000, 0x3fffa8090000) = -6 (No such device or address) VFIO_MAP_DMA: -6 ... " lspci info in my host: [root@ibm-p8-rhevm-11 ~]# lspci 0000:00:00.0 PCI bridge: IBM Device 03dc 0001:00:00.0 PCI bridge: IBM Device 03dc 0001:01:00.0 PCI bridge: PLX Technology, Inc. PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch (rev ca) 0001:02:01.0 PCI bridge: PLX Technology, Inc. PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch (rev ca) 0001:02:08.0 PCI bridge: PLX Technology, Inc. PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch (rev ca) 0001:02:09.0 PCI bridge: PLX Technology, Inc. PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch (rev ca) 0001:08:00.0 RAID bus controller: IBM PCI-E IPR SAS Adapter (ASIC) (rev 02) 0002:00:00.0 PCI bridge: IBM Device 03dc 0002:01:00.0 Ethernet controller: Mellanox Technologies MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s] (rev b0) 0003:00:00.0 PCI bridge: IBM Device 03dc 0003:01:00.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca) 0003:02:01.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca) 0003:02:08.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca) 0003:02:09.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca) 0003:02:10.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca) 0003:02:11.0 PCI bridge: PLX Technology, Inc. Device 8748 (rev ca) 0003:03:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02) 0003:09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 0003:09:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 0003:09:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 0003:09:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 0004:00:00.0 PCI bridge: IBM Device 03dc 0005:00:00.0 PCI bridge: IBM Device 03dc 0006:00:00.0 PCI bridge: IBM Device 03dc I've confirmed I can reproduce this with the latest downstream qemu, but not with upstream qemu. I notice something a little different in the symptoms. The first patch of vfio_dma_maps() fails with ENXIO (errno -6) VFIO_MAP_DMA: -6 vfio_dma_map(0x10020acaf80, 0x40000000, 0x10000, 0x3fff3d660000) = -6 (No such device or address) VFIO_MAP_DMA: -6 vfio_dma_map(0x10020acaf80, 0x40010000, 0x10000, 0x3fff3d670000) = -6 (No such device or address) However, later ones fail with EBUSY (errno -11) VFIO_MAP_DMA: -6 vfio_dma_map(0x10020acaf80, 0x403c0000, 0x10000, 0x3fff3da20000) = -6 (No such device or address) VFIO_MAP_DMA: -6 vfio_dma_map(0x10020acaf80, 0x403d0000, 0x10000, 0x3fff3da30000) = -11 (Resource temporarily unavailable) I think the "VFIO_MAP_DMA: -6" is reporting an ENXIO from the unmap when the qemu code attempts to roll back and remap on EBUSY. I've tracked this down to missing upstream commit d78c19b5cf4821d0c198f4132a085bdbf19dda4c Working brew build at: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=11620440 Fix included in qemu-kvm-rhev-2.6.0-22.el7 Tested with fixed version qemu-kvm-rhev-2.6.0-22.el7 , the result is good. Boot up guest with cmd as in comment #c1 1. In guest,can ping outside successfully 2. hot unplug the vfio device(BCM 5719): {"execute":"device_del","arguments":{"id":"pf1"}} ... In the guest, there is no target device. [root@ibm-p8-rhevm-13 ~]# ifconfig lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1 (Local Loopback) RX packets 76 bytes 6824 (6.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 76 bytes 6824 (6.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 3. hot plug the vfio device again {"execute":"device_add","arguments":{"driver":"vfio-pci","host":"0003:09:00.0","id":"pf1"}} ... 4.Check the output of qemu monitor: (qemu) (qemu).. no any error msg raise up. 5. In guest , check the network device [root@ibm-p8-rhevm-13 ~]# ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether 40:f2:e9:5d:9c:a8 txqueuelen 1000 (Ethernet) RX packets 91 bytes 7938 (7.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 19 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1 (Local Loopback) RX packets 76 bytes 6824 (6.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 76 bytes 6824 (6.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 The device shows up. 6. in guest , got the device an ip by dhclient and ping outside. [root@ibm-p8-rhevm-13 ~]# ping 10.66.10.172 -c 5 PING 10.66.10.172 (10.66.10.172) 56(84) bytes of data. 64 bytes from 10.66.10.172: icmp_seq=1 ttl=54 time=308 ms 64 bytes from 10.66.10.172: icmp_seq=2 ttl=54 time=308 ms 64 bytes from 10.66.10.172: icmp_seq=3 ttl=54 time=310 ms 64 bytes from 10.66.10.172: icmp_seq=4 ttl=54 time=309 ms 64 bytes from 10.66.10.172: icmp_seq=5 ttl=54 time=309 ms So , the bug is fixed. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2673.html |