Bug 1662272

Summary: Boot guest with device assignment+vIOMMU, qemu prompts "vtd_interrupt_remap_msi: MSI address low 32 bit invalid: 0x0" when first rebooting guest
Product: Red Hat Enterprise Linux 8 Reporter: Pei Zhang <pezhang>
Component: qemu-kvmAssignee: Peter Xu <peterx>
Status: CLOSED ERRATA QA Contact: Pei Zhang <pezhang>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.1CC: ailan, chayang, ddepaula, jinzhao, juzhang, rbalakri, virt-maint, yfu
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-2.12.0-65.module+el8.1.0+2983+b2ae9c0a Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 20:47:01 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:

Description Pei Zhang 2018-12-27 09:23:33 UTC
Description of problem:
Boot guest with device assignment+vIOMMU, then reboot guest, qemu will prompt "qemu-kvm: vtd_interrupt_remap_msi: MSI address low 32 bit invalid: 0x0".


Version-Release number of selected component (if applicable):
qemu-kvm-2.12.0-51.module+el8+2608+a17c4bfe.x86_64
4.18.0-57.el8.x86_64


How reproducible:
100%


Steps to Reproduce:
1. Boot qemu, see[1]

2. In guest, reboot, qemu terminal will prompt invalid message.
# reboot

(qemu) qemu-kvm: vtd_interrupt_remap_msi: MSI address low 32 bit invalid: 0x0

Actual results:
qemu prompts invalid message when first reboot guest.


Expected results:
qemu should not prompts invalid message.


Additional info:
1. Without vIOMMU, everything works well.

Reference:
[1]
/usr/libexec/qemu-kvm -name rhel8.0 \
-M q35,kernel-irqchip=split \
-cpu Haswell-noTSX -m 8G \
-device intel-iommu,intremap=true,caching-mode=true \
-smp 4,sockets=1,cores=4,threads=1 \
-device pcie-root-port,id=root.1,chassis=1 \
-device pcie-root-port,id=root.2,chassis=2 \
-device pcie-root-port,id=root.3,chassis=3 \
-device pcie-root-port,id=root.4,chassis=4 \
-blockdev driver=file,cache.direct=off,cache.no-flush=on,filename=/home/rhel8.0.qcow2,node-name=my_file \
-blockdev driver=qcow2,node-name=my,file=my_file \
-device virtio-blk-pci,drive=my,id=virtio-blk0,bus=root.1 \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=18:66:da:5f:dd:02,bus=root.2,iommu_platform=on,ats=on \
-vnc :2 \
-monitor stdio \
-device vfio-pci,host=0000:3b:00.0,bus=root.3 \
-device vfio-pci,host=0000:3b:00.1,bus=root.4 \

Comment 1 Pei Zhang 2018-12-27 09:25:41 UTC
Additional info:
Fast train bug: Bug 1662270

Comment 2 Peter Xu 2019-02-12 08:10:56 UTC
Patchset merged for QEMU 4.0:

 2a078b1080 intel_iommu: fix operator in vtd_switch_address_space
 d7bb469afa intel_iommu: reset intr_enabled when system reset
 afa26ecc30 pci/msi: export msi_is_masked()
 a56de056c9 contrib/vhost-user-blk: fix the compilation issue
 (caution: this one has the wrong naming comparing to posted, but the content is there: 
  https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg01145.html)

Comment 4 Danilo de Paula 2019-04-09 19:14:33 UTC
Fix included in qemu-kvm-2.12.0-65.module+el8.1.0+2983+b2ae9c0a

Comment 6 Pei Zhang 2019-04-25 01:59:09 UTC
Verified with qemu-kvm-2.12.0-65.module+el8.1.0+2983+b2ae9c0a.x86_64:

Steps:
1. Boot VM as Description.

2. Reboot/Shutdown VM several times, no any error shows in qemu/guest/host.

So this bug has been fixed very well. Move to 'VERIFIED'.

Comment 8 errata-xmlrpc 2019-11-05 20:47:01 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-2019:3345