Can one domain have multiple iommu page tables in the Xen environment with VT-d

160 Views Asked by At

As we know, IOMMU does the remapping from GPA to HPA. When I look into the codes in xen passthrough driver, It seems that all the devices belonging to dom0 (domu is the same) share one IOMMU page table.

My current project uses Intel VT-d, and needs one separate IOMMU page table for one specified device, thus dom0 may have 2 iommu page tables in total, one is 1:1 mapping, one is my separated page table.

I wonder could this requirement be satisfied? if so, how will IOMMU do the iotlb?

1

There are 1 best solutions below

0
On

Actually, the term domain is different from the term domain in Xen.

One device indeed can have one remapping structure in VT-d. And the domain_id in the context entry indicates the number of this remapping structure, which can be decided by YOU.

The bridge between the domain in Xen and the domain_id in context entry is one Hash Map.

In summary, one domain has its own P2M mapping, but the devices assigned to this domain can have different remapping structures in VT-d.