Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1515110 - Regression in QEMU handling for sub-page MMIO BARs for vfio-pci devices [rhel-7.4.z]
Summary: Regression in QEMU handling for sub-page MMIO BARs for vfio-pci devices [rhel...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Alex Williamson
QA Contact: Yanan Fu
Depends On: 1511802
TreeView+ depends on / blocked
Reported: 2017-11-20 07:27 UTC by Oneata Mircea Teodor
Modified: 2018-01-25 11:44 UTC (History)
17 users (show)

Fixed In Version: qemu-kvm-1.5.3-141.el7_4.5
Doc Type: Bug Fix
Doc Text:
Previously, the memory mapping of processor access to base address registers (BARs) smaller than the system page size was incorrect. As a consequence, devices assigned to a guest virtual machine using the vfio-pci driver did not work, which in some cases prevented the guest from booting. This update fixes the QEMU emulator to map the affected devices properly, and the described problem no longer occurs.
Clone Of: 1511802
Last Closed: 2018-01-25 11:44:56 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0148 normal SHIPPED_LIVE qemu-kvm bug fix update 2018-01-25 16:17:25 UTC

Description Oneata Mircea Teodor 2017-11-20 07:27:39 UTC
This bug has been copied from bug #1511802 and has been proposed to be backported to 7.4 z-stream (EUS).

Comment 5 Miroslav Rezanina 2017-11-29 07:33:05 UTC
Fix included in qemu-kvm-1.5.3-141.el7_4.5

Comment 6 Yanan Fu 2017-11-29 10:06:47 UTC
Reproduce this bz successfully, and it is ok with qemu-kvm-1.5.3-141.el7_4.5.

Test steps:
1. Unbind one EHCI device from host, and bind to vfio-pci.
#lspci | grep "USB Enhanced"
00:1a.0 USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #2 (rev 05)
00:1d.0 USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #1 (rev 05)

Choose "00:1a.0".
# readlink /sys/bus/pci/devices/0000\:00\:1a.0/iommu_group
# ls /sys/kernel/iommu_groups/10/devices/
0000:00:1a.0  ---> iommu group 10 only have one device, it is ok for testing. 

Unbind it from host and bind it vfio-pci.
#ll /sys/bus/pci/devices/0000\:00\:1a.0/driver
lrwxrwxrwx. 1 root root 0 Nov 29 04:19 /sys/bus/pci/devices/0000:00:1a.0/driver -> ../../../bus/pci/drivers/vfio-pci

2. Boot VM with this passthrough device:
-device vfio-pci,host=00:1a.0,id=ehci \

3. Connect to VM and check the status of the VM.

Test version:
qemu: qemu-kvm-1.5.3-141.el7
kernel: kernel-3.10.0-693.el7.x86_64

Test result:
Guest stuck at "Press ESC for boot menu" (i add "-boot menu=on in the command line"), without "-boot menu=on", guest stuck at "ipxe(hrrp://"

when i boot without the pass through EHCI device, guest work well.

Test version:
qemu: qemu-kvm-1.5.3-141.el7_4.5.x86_64
kernel: kernel-3.10.0-693.el7.x86_64

Test result:
Guest can boot up normally, reboot, shutdown and hot-plug/unplug the pass through device several times, no problem.

Comment 10 Yanan Fu 2017-12-04 02:41:46 UTC
Move to verified per comment 6.

Comment 13 errata-xmlrpc 2018-01-25 11:44:56 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.