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.
Bug 1467883 - unbreak virtio-scsi for vIOMMU
Summary: unbreak virtio-scsi for vIOMMU
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: jason wang
QA Contact: Xueqiang Wei
URL:
Whiteboard:
Depends On:
Blocks: 1471076
TreeView+ depends on / blocked
 
Reported: 2017-07-05 12:22 UTC by jason wang
Modified: 2017-11-28 08:39 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1471076 (view as bug list)
Environment:
Last Closed: 2017-11-28 08:39:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description jason wang 2017-07-05 12:22:36 UTC
Description of problem:

commit e5b9f9a660151f4cd62e70380d721bd4985b72c5
Author: Jason Wang <jasowang>
Date:   Tue Jul 4 20:01:17 2017 +0800

    virtio-scsi: finalize IOMMU support
    
    After converting to use DMA api for virtio devices, we should use
    dma_as instead of address_space_memory. Otherwise it won't work if
    IOMMU is enabled.
    
    Fixes: commit 8607f5c3072c ("virtio: convert to use DMA api")
    Cc: qemu-stable
    Signed-off-by: Jason Wang <jasowang>


Version-Release number of selected component (if applicable):


How reproducible:

100%

Steps to Reproduce:
1. boot virtio-scsi with iommu_platform=on
2.
3.

Actual results:

Can't access root fs.

Expected results:

Works like a charm.

Additional info:

Comment 2 jason wang 2017-07-06 02:38:43 UTC
In the pull request from Paolo.

Comment 9 Xueqiang Wei 2017-11-28 08:22:49 UTC
Tested on the latest version, not hit this issue.

Host:
kernel-3.10.0-798.el7.x86_64
qemu-kvm-rhev-2.10.0-8.el7

Guest: 
kernel-3.10.0-798.el7.x86_64


Details:

1. In host, add "iommu=pt intel_iommu=on" to kernel line, then reboot host
2. Add "intel_iommu=on" to kernel line of q35 guest
3. boot virtio-scsi with iommu_platform=on 
/usr/libexec/qemu-kvm \ 
-M q35,kernel-irqchip=split \
-cpu host \ 
-enable-kvm \ 
-m 2G \ 
-smp 4 \ 
-nodefconfig \ 
-rtc base=localtime,driftfix=slew \ 
-device intel-iommu,device-iotlb=on,intremap \ 
-device virtio-scsi-pci,disable-legacy=on,disable-modern=off,iommu_platform=on,ats=on,id=scsi0,bus=pcie.0 \ 
-drive file=rhel75-64-virtio-scsi.qcow2,if=none,serial=virtioblk1,format=qcow2,cache=none,werror=stop,rerror=stop,id=drive-virtio-disk0,aio=native \ 
-device scsi-hd,bus=scsi0.0,drive=drive-virtio-disk0,id=virtio-disk0 \ 
-device piix3-usb-uhci,id=usb \ 
-device usb-tablet,id=tablet0 \ 
-vnc :0 \ 
-k en-us \ 
-vga std \ 
-qmp tcp:0:4444,server,nowait \ 
-boot menu=on \ 
-monitor stdio \ 
-device virtio-net-pci,mac=fa:f7:f8:5f:fa:5b,id=idn0VnaA,vectors=4,netdev=id8xJhp7,bus=pcie.0,addr=06 \ 
-netdev tap,id=id8xJhp7,vhost=on \
4. verify IOMMU enabled, in the guest 
# journalctl -k | grep -i "IOMMU enabled" 
# journalctl -k | grep -i "DMAR: Intel(R) Virtualization Technology for Directed I/O"


After step 4:
#  journalctl -k | grep -i "IOMMU enabled" 
Nov 28 11:10:53 localhost kernel: DMAR: IOMMU enabled

#  journalctl -k | grep -i "DMAR: Intel(R) Virtualization Technology for Directed I/O"
Nov 28 11:10:53 localhost kernel: DMAR: Intel(R) Virtualization Technology for Directed I/O

Comment 10 jason wang 2017-11-28 08:39:49 UTC
Thanks.

Close this as current release according to comment #9.


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