[vfio-users] IOMMU page table of QEMU vfio device passthrough

Huaicheng Li huaicheng at cs.uchicago.edu
Tue Jun 5 22:16:55 UTC 2018


Hi,

I assigned a PCIe device to my QEMU VM and learnt that in this case, IOMMU
maintains GPA->HPA translation. What I
want to achieve is to pass commands with host physical addresses to the
device from inside the VM and see if the DMA
will successfully do that for me.

(1). How does VFIO setup the GPA->HPA mapping for each DMA buffer? which
source file can I refer to for such information?
Currently I'm looking at VFIO_IOMMU_DMA_MAP, it seems it only maps the base
address of QEMU guest memory region to
IOVA. Does this mean that later all GPA->HPA translation are based on that
plus some offsets?

(2). Is it possible for me to disable IOMMU page tables as I just want to
give the device a host physical address?

Any pointers on how I can achieve this would be appreciated.

Thanks.

Best,
Huaicheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20180605/dcd00c5b/attachment.htm>


More information about the vfio-users mailing list