[vfio-users] vfio dma map succeeds but dmesg indicates error

Christopher Thompson Chris.Thompson1 at synopsys.com
Thu Mar 30 13:50:27 UTC 2017


Hi,

I'm currently using VFIO for PCI passthrough in a custom simulation, and have discovered that when I try to map IO virtual addresses larger than my host supports, VFIO happily returns 0 from the dma map ioctl, but dmesg is telling me something is wrong.

I noticed this after a few days of wondering why this specific simulation wasn't working - the simulated system is trying to setup dma addresses using 40-bits of address space, starting at 0xfffffff000 and descending, it turns out my host only support 39 bits.

For example a dma map of 0xffffffd000, size 0x1000, the ioctl returns 0 (but if I inspect errno it has the value "Bad address"). Dmesg generates the error:
[677414.285778] intel_iommu_map: iommu width (39) is not sufficient for the mapped address (ffffffe000)

I can accept that I can't map addresses larger than my host IOMMU supports, but shouldn't VFIO report an error from the mapping?

If this has been fixed in a later version please let me know, my Google-fu wasn't good enough to find much on this error. My kernel is a relatively ancient 3.13 (Ubuntu 14.04.4).

Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20170330/7907352b/attachment.htm>


More information about the vfio-users mailing list