Bug 1471076 - unbreak virtio-scsi for vIOMMU
Summary: unbreak virtio-scsi for vIOMMU
Keywords:
Status: CLOSED ERRATA
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: 1463163 1467883
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-14 11:04 UTC by Jaroslav Reznik
Modified: 2022-07-09 08:45 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-rhev-2.9.0-16.el7_4.1
Doc Type: Known Issue
Doc Text:
Cause: It needs a newer version of seabios to be fully functional. Consequence: virtio-scsi disks can be used, but not as boot disk. Workaround (if any): Do not use virtio-scsi as boot-disk or wait to seabios to be released on August 29th. Result:
Clone Of: 1467883
Environment:
Last Closed: 2017-08-01 23:25:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2390 0 normal SHIPPED_LIVE Moderate: qemu-kvm-rhev security update 2017-08-01 19:48:22 UTC

Description Jaroslav Reznik 2017-07-14 11:04:29 UTC
This bug has been copied from bug #1467883 and has been proposed to be backported to 7.4 z-stream (EUS).

Comment 2 Miroslav Rezanina 2017-07-17 05:39:36 UTC
Fix included in qemu-kvm-rhev-2.9.0-16.el7_4.1

Comment 4 Xueqiang Wei 2017-07-17 12:48:03 UTC
Reproduce bug with the following steps:

host kernel: 3.10.0-693.el7.x86_64
guest kernel: 3.10.0-693.el7.x86_64
qemu-kvm-rhev-2.9.0-16.el7
seabios-1.10.2-3.el7.x86_64


1. In host, add "iommu=pt intel_iommu=on" to kernel line
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 \
  -cpu host \
  -enable-kvm \
  -m 2G \
  -smp 4 \
  -nodefconfig \
  -rtc base=localtime,driftfix=slew \
  -device virtio-scsi-pci,disable-legacy=on,disable-modern=off,iommu_platform=on,id=scsi0,bus=pcie.0 \
  -drive file=rhel74-64-virtio-scsi.raw,if=none,serial=virtioblk1,format=raw,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 \
  


Actual results:
After step 3: Boot failed: could not read the boot disk

Expected results:
guest works well


Retest on the below version, guest boot up and works well.
host kernel: 3.10.0-693.el7.x86_64
guest kernel: 3.10.0-693.el7.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.1
seabios: https://bugzilla.redhat.com/attachment.cgi?id=1293726 (bios that supports IOMMU_PLATFORM), add "-bios bios.bin \" to cmd

Additional info:
if not add "-bios bios.bin" to command line when tested qemu-kvm-rhev-2.9.0-16.el7_4.1, the guest also can not boot up.


Hi Jason,

If the steps are enough to verify this bug, if not correct me please. Many thanks.

Comment 5 jason wang 2017-07-18 02:11:00 UTC
I think it's sufficient. But for safety, we'd better wait for seabios patch to be merged to verify the bug.

Thanks a lot.

Comment 6 Xueqiang Wei 2017-07-18 10:38:05 UTC
Missing "-device intel-iommu,device-iotlb=on,intremap" in cml in Comment 4, so update cml (According to https://bugzilla.redhat.com/show_bug.cgi?id=1283251#c48), and update steps as below.

1. In host, add "iommu=pt intel_iommu=on" to kernel line
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=rhel74-64-virtio-scsi.raw,if=none,serial=virtioblk1,format=raw,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 \
  -bios bios.bin \
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"

Actual results:
After step 3: Boot failed: could not read the boot disk

Expected results:
After step 3: guest works well
After step 4: value likes below.
             # journalctl -k | grep -i "IOMMU enabled"
             Jul 18 13:19:49 localhost kernel: DMAR: IOMMU enabled
             # journalctl -k | grep -i "DMAR: Intel(R) Virtualization Technology for Directed I/O"
            Jul 18 13:19:49 localhost kernel: DMAR: Intel(R) Virtualization Technology for Directed I/O

Comment 8 Xueqiang Wei 2017-07-27 01:46:02 UTC
According to the steps in Comment 6, retested on below version, not hit this issue. So verify the bug.

host kernel: 3.10.0-693.el7.x86_64
guest kernel: 3.10.0-693.el7.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.1
seabios-1.10.2-4.el7_4.x86_64


After step 3: guest works well
After step 4: value likes below.
# journalctl -k | grep -i "IOMMU enabled"
Jul 27 05:34:31 localhost kernel: DMAR: IOMMU enabled
# journalctl -k | grep -i "DMAR: Intel(R) Virtualization Technology for Directed I/O"
Jul 27 05:34:31 localhost kernel: DMAR: Intel(R) Virtualization Technology for Directed I/O

Comment 10 errata-xmlrpc 2017-08-01 23:25:33 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.

https://access.redhat.com/errata/RHSA-2017:2390


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