Bug 1686278

Summary: qemu-kvm: vtd_iommu_translate: detected translation failure (harmless warning message)
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Xueqiang Wei <xuwei>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
qemu-kvm sub component: virtio-blk,scsi QA Contact: qing.wang <qinwang>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: low    
Priority: low CC: aliang, chayang, coli, fjin, jinzhao, jsnow, juzhang, ngu, pbonzini, peterx, pezhang, virt-maint, xiaohli, xuwei, yafu, yalzhang, yduan
Version: ---Keywords: Triaged
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: 1597482 Environment:
Last Closed: 2021-03-15 07:34:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1547940, 1597482    
Bug Blocks: 1597525    

Comment 3 Xueqiang Wei 2019-03-07 07:27:38 UTC
When verify bug [1], hit this issue. 

[1] Bug 1597482 - qemu crashed when disk enable the IOMMU


Details as below:

Host:
kernel-3.10.0-1010.el7.x86_64
qemu-kvm-rhev-2.12.0-24.el7

Guest:
kernel-3.10.0-1010.el7.x86_64

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=rhel76-64-virtio-scsi.qcow2,if=none,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" 
Feb 28 11:13:59 localhost kernel: DMAR: IOMMU enabled
# journalctl -k | grep -i "DMAR: Intel(R) Virtualization Technology for Directed I/O"
Feb 28 11:13:59 localhost kernel: DMAR: Intel(R) Virtualization Technology for Directed I/O


Hit below issue during booting guest.

# sh bug_iommu.sh 
QEMU 2.12.0 monitor - type 'help' for more information
(qemu) qemu-kvm: vtd_iommu_translate: detected translation failure (dev=00:02:00, iova=0x0)
qemu-kvm: New fault is not recorded due to compression of faults
qemu-kvm: virtio: zero sized buffers are not allowed

(qemu) system_reset 
(qemu) qemu-kvm: Guest says index 29281 is available
qemu-kvm: virtio: zero sized buffers are not allowed

(qemu) system_powerdown

Comment 6 Paolo Bonzini 2019-03-12 12:44:22 UTC
Yep, I agree.

Comment 8 Peter Xu 2019-07-01 06:52:30 UTC
*** Bug 1722789 has been marked as a duplicate of this bug. ***

Comment 10 Ademar Reis 2020-02-05 22:55:08 UTC
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks

Comment 11 John Ferlan 2020-02-06 19:15:15 UTC
Move to the general virt-maint backlog

Comment 14 RHEL Program Management 2021-03-15 07:34:04 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 15 qing.wang 2021-03-23 02:53:39 UTC
QE agree to close due to not hit this issue in current release.
qemu-kvm-common-5.2.0-14.module+el8.4.0+10425+ad586fa5.x86_64