Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1868535

Summary: Boot qemu with vhost-vdpa fails with error : vhost-vdpa: DMA mapping failed, unable to continue
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Pei Zhang <pezhang>
Component: qemu-kvmAssignee: lulu <lulu>
qemu-kvm sub component: Networking QA Contact: Pei Zhang <pezhang>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: high    
Priority: high CC: aadam, chayang, jinzhao, juzhang, leiyang, lulu, virt-maint, wquan
Version: 8.3Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.4   
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: 2020-10-19 07:56:35 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 2020-08-13 02:58:05 UTC
Description of problem:
Boot -netdev vhost-vdpa, qemu terminal shows error:

Version-Release number of selected component (if applicable):
qemu-kvm-5.1.0-2.module+el8.3.0+7652+b30e6901.x86_64
4.18.0-232.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Load vhost_vpda and vdpa_sim module

# modprobe vhost_vdpa
# modprobe vdpa_sim

2. Check vhost-vdap device exists.

# ls /dev/vhost-vdpa-0 
/dev/vhost-vdpa-0

3. Boot qemu with vhost-vdpa

# /usr/libexec/qemu-kvm -netdev vhost-vdpa,vhostdev=/dev/vhost-vdpa-0,id=vdpa0 -device virtio-net-pci,netdev=vdpa0
VNC server running on ::1:5900
qemu-kvm: failed to write, fd=11, errno=14 (Bad address)
qemu-kvm: vhost vdpa map fail!
qemu-kvm: vhost-vdpa: DMA mapping failed, unable to continue
qemu-kvm: failed to write, fd=11, errno=14 (Bad address)
qemu-kvm: vhost vdpa map fail!
qemu-kvm: vhost-vdpa: DMA mapping failed, unable to continue
qemu-kvm: failed to write, fd=11, errno=14 (Bad address)
qemu-kvm: vhost vdpa map fail!
qemu-kvm: vhost-vdpa: DMA mapping failed, unable to continue
qemu-kvm: failed to write, fd=11, errno=14 (Bad address)
qemu-kvm: vhost vdpa map fail!
qemu-kvm: vhost-vdpa: DMA mapping failed, unable to continue
qemu-kvm: failed to write, fd=11, errno=14 (Bad address)
qemu-kvm: vhost vdpa map fail!
qemu-kvm: vhost-vdpa: DMA mapping failed, unable to continue
qemu-kvm: failed to write, fd=11, errno=14 (Bad address)
qemu-kvm: vhost vdpa map fail!
qemu-kvm: vhost-vdpa: DMA mapping failed, unable to continue
qemu-kvm: failed to write, fd=11, errno=14 (Bad address)
qemu-kvm: vhost vdpa map fail!
qemu-kvm: vhost-vdpa: DMA mapping failed, unable to continue


Actual results:
There are error shows with vhost-vdpa.

Expected results:
There should be no errors.

Additional info:

Comment 1 lulu@redhat.com 2020-08-13 03:31:02 UTC
Hi pei 
you can try to set: 
ulimit -l unlimited
before load the qemu

Thanks
cindy

Comment 2 Pei Zhang 2020-08-13 03:49:00 UTC
(In reply to lulu from comment #1)
> Hi pei 
> you can try to set: 
> ulimit -l unlimited
> before load the qemu

Hello Cindy,

Thank you for your fast comment. This issue is gone after executing "ulimit -l unlimited". 

Should this info be mentioned in the qemu warning or qemu-kvm man page? As users may hit same issue, it will be better if there is any tips. What do you think?

Thank you.

Best regards,

Pei 

> 
> Thanks
> cindy

Comment 3 lulu@redhat.com 2020-08-14 02:40:32 UTC
(In reply to Pei Zhang from comment #2)
> (In reply to lulu from comment #1)
> > Hi pei 
> > you can try to set: 
> > ulimit -l unlimited
> > before load the qemu
> 
> Hello Cindy,
> 
> Thank you for your fast comment. This issue is gone after executing "ulimit
> -l unlimited". 
> 
> Should this info be mentioned in the qemu warning or qemu-kvm man page? As
> users may hit same issue, it will be better if there is any tips. What do
> you think?
> 
> Thank you.
> 
> Best regards,
> 
> Pei 
> 
> > 
> > Thanks
> > cindy

Thanks a lot Pei, I'm now writing the handson for vdpa, I will add these information in it

Comment 4 lulu@redhat.com 2020-09-21 05:50:59 UTC
The hans on is still under review, After discussed with pei, We plan to move this to AV8.4

Comment 5 lulu@redhat.com 2020-10-15 02:58:34 UTC
Hi pei, 
The hands on was post, here is the link
https://www.redhat.com/en/blog/hands-vdpa-what-do-you-do-when-you-aint-got-hardware
Thanks
Cindy

Comment 7 Pei Zhang 2020-10-19 07:56:35 UTC
Thanks Cindy.

As Comment 5, this issue has been resolved. Move to 'CURRENTRELEASE'.