Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
VT-d has special support for passthrough mode. Let's support that feature in our VT-d emulation.
That'll benefit us when guest is using "iommu=pt" mode. We'll avoid having an identity mapping, which will not only lock up all guest memory, but also slower than hardware passthrough mode (which is what we are going to support).
Version-Release number of selected component (if applicable):
N/A
How reproducible:
N/A
Steps to Reproduce:
(hardware passthrough mode is not only for vfio-pci device, but here we use this device to detect whether it's working by observing some warning messages)
Start guest with vfio-pci device:
bin=x86_64-softmmu/qemu-system-x86_64
$bin -M q35,accel=kvm,kernel-irqchip=split -m 2G \
-device intel-iommu,intremap=on,caching-mode=on \
-device vfio-pci,host=00:19.0 \
/var/lib/libvirt/images/fedora-25.qcow2
Actual results:
When without passthrough mode support, we'll see some warnings like:
qemu-system-x86_64: iommu has granularity incompatible with target AS
or/and:
qemu-system-x86_64: iommu map to non memory area 180000000
Expected results:
See no warnings. (Actually, guest will boot slightly faster)
The block field is incorrect. I was meaning bug 1448813, but now I would prefer no dependency since we'll postpone this bug to 7.5 and we need to solve the crash in bug 1448813.
As a conclusion, I'm removing the blocker.
qemu command line:
/usr/libexec/qemu-kvm \
-M q35,accel=kvm,kernel-irqchip=split \
-m 2G \
-cpu SandyBridge,enforce \
-device intel-iommu,intremap=on,caching-mode=on,id=viommu \
-device pcie-root-port,id=root0,slot=1 \
-device pcie-root-port,id=root1,slot=2 \
-drive file=/home/rhel74-64-virtio.qcow2,if=none,id=drive-virtio-blk-disk,format=qcow2,cache=none \
-device virtio-blk-pci,bus=root0,drive=drive-virtio-blk-disk \
-monitor stdio \
-vga qxl \
-vnc :0 \
-device vfio-pci,host=83:00.0,id=pf,rombar=0,bus=root1 \
Test steps:
1. Prepare a guest with "intel_iommu=on iommu=pt" in kernel line
2. Boot the vm with the command line above, key device:
-M q35,accel=kvm,kernel-irqchip=split \
-device intel-iommu,intremap=on,caching-mode=on,id=viommu \
-device vfio-pci,host=83:00.0,id=pf,rombar=0,bus=root1 \
---------------------reproduce---------------
Reproduce this bz with RHEL7.4.z, as this issue exist before rebase to 2.10.
Test version:
qemu-kvm: qemu-img-rhev-2.9.0-16.el7_4.10.x86_64
After during guest booting, qemu monitor promote:
(qemu) qemu-kvm: iommu has granularity incompatible with target AS
reproduce this issue successfully.
---------------------verification---------------
Test version:
qemu-kvm: qemu-kvm-rhev-2.10.0-3.el7
Guest can boot up without the warning, and run normally.
According to the test result above, move to VERIFIED.
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://access.redhat.com/errata/RHSA-2018:1104
Description of problem: VT-d has special support for passthrough mode. Let's support that feature in our VT-d emulation. That'll benefit us when guest is using "iommu=pt" mode. We'll avoid having an identity mapping, which will not only lock up all guest memory, but also slower than hardware passthrough mode (which is what we are going to support). Version-Release number of selected component (if applicable): N/A How reproducible: N/A Steps to Reproduce: (hardware passthrough mode is not only for vfio-pci device, but here we use this device to detect whether it's working by observing some warning messages) Start guest with vfio-pci device: bin=x86_64-softmmu/qemu-system-x86_64 $bin -M q35,accel=kvm,kernel-irqchip=split -m 2G \ -device intel-iommu,intremap=on,caching-mode=on \ -device vfio-pci,host=00:19.0 \ /var/lib/libvirt/images/fedora-25.qcow2 Actual results: When without passthrough mode support, we'll see some warnings like: qemu-system-x86_64: iommu has granularity incompatible with target AS or/and: qemu-system-x86_64: iommu map to non memory area 180000000 Expected results: See no warnings. (Actually, guest will boot slightly faster)