Bug 1722789

Summary: qemu prompt: qemu-kvm: vtd_iommu_translate: detected translation failure (dev=02:00:00, iova=0x0) when boot guest with IOMMU
Product: Red Hat Enterprise Linux 7 Reporter: Li Xiaohui <xiaohli>
Component: qemu-kvm-rhevAssignee: Peter Xu <peterx>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.7CC: chayang, coli, jinzhao, juzhang, pezhang, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-01 06:52:30 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 Li Xiaohui 2019-06-21 10:13:16 UTC
Description of problem:
qemu prompt: qemu-kvm: vtd_iommu_translate: detected translation failure (dev=02:00:00, iova=0x0) when boot guest with IOMMU.
Detailed configure please see "Steps to Reproduce"


Version-Release number of selected component (if applicable):
host info: kernel-3.10.0-1056.el7.x86_64 & qemu-kvm-rhev-2.12.0-33.el7.x86_64
guest info: kernel-3.10.0-1056.el7.x86_64


How reproducible:
4/4


Steps to Reproduce:
1.boot guest with commands:
/usr/libexec/qemu-kvm -M q35,kernel-irqchip=split \
-device intel-iommu,intremap=on,caching-mode=on,device-iotlb=on \
-m 8G  \
-smp 4,cores=2,threads=1,sockets=2  \
-cpu 'SandyBridge' \
-device pcie-root-port,id=pcie.0-root-port-2,slot=2,chassis=2,addr=0x2,bus=pcie.0 \
-device pcie-root-port,id=pcie.0-root-port-3,slot=3,chassis=3,addr=0x3,bus=pcie.0 \
-device pcie-root-port,id=pcie.0-root-port-4,slot=4,chassis=4,addr=0x4,bus=pcie.0 \
-device virtio-scsi-pci,id=virtio_scsi_pci0,iommu_platform=on,ats=on,bus=pcie.0-root-port-3,addr=0x0 \
-drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=qcow2,file=/mnt/nfs/rhel7-7-64-virtio-scsi.qcow2 \
-device scsi-hd,id=image1,drive=drive_image1 \
-device virtio-net-pci,mac=9a:f5:f6:f7:f8:f9,id=idLnLWR0,vectors=4,netdev=idINi0TE,bus=pcie.0-root-port-4,addr=0x0  \
-netdev tap,id=idINi0TE,vhost=on \
-vnc :0  \
-qmp tcp:0:4440,server,nowait \
-monitor stdio \
-device VGA \
-boot menu=on \
2.and before step1, guest kernel line has been added "intel_iommu=on"
3.after guest started, see hmp.


Actual results:
found hmp prompt:
(qemu) qemu-kvm: vtd_iommu_translate: detected translation failure (dev=02:00:00, iova=0x0)
qemu-kvm: New fault is not recorded due to compression of faults
qemu-kvm: virtio: zero sized buffers are not allowed


Expected results:
no warning prompt in hmp when boot guest with iommu


Additional info:
1.on rhel8.1.0 host, both slow train and fast train don't reproduce this issue;
2.on rhel8.0.1 host, don't hit this issue, too

Comment 2 Li Xiaohui 2019-06-21 10:15:18 UTC
Additional info:
3.when boot guest without kernel line "intel_iommu=on", won't receive hmp warning

Comment 3 Peter Xu 2019-07-01 04:42:12 UTC
I think this is a dup of Bug 1686278, am I right?

Comment 4 Li Xiaohui 2019-07-01 06:29:11 UTC
(In reply to Peter Xu from comment #3)
> I think this is a dup of Bug 1686278, am I right?

I think is same issue, but that bz is for rhel8.1.0 upstream, this is for rhel7.7, thanks.