Hi all,
This link is VTD spec.
http://download.intel.com/technology/computing/vptech/Intel(r)_VT_for_Direct_IO.pdf
VTD is used to translate GPA (issued by device)to HPA .
This way dom0 can assign a device to domU or VTi-domain.
Then domU and VTi-domain can directly access this
device using GPA,
This will definitely improve performance greatly.
For example,
Dom0 assigns a NIC to domU,
Then domU commands NIC to read data from main memory with
GPA address by using DMA,
DMA for NIC read data from main memory with GPA, it is
VTD to translate GPA to HPA.
It is no doubt we should introduce VTD in XEN/IPF
For supporting VTD, we need to provide VTD a page
table, from which VTD can get GPA to HPA translations.
We already have P2M which describes GPA to HPA mapping
for every domU or VTI-domain.
It is natural for VTD to use P2M as its page table.
However, P2M is using 16K page size on IPF/xen, while
VTD is using 4k page size ( or 2M …).
There are two solutions.
1. Use
separate page table for VTD.
Pro:
Maybe is
simpler way.( I’m not sure)
Con:
1.
Waste some memory
2.
Xen needs to synchronize VTD page table and P2M, when foreign map or swaping
page happens.
2. Change
P2M according to VTD page table format.
Pro;
Only
one table to describe GPA to HPA mapping
Con:
We
need to change related part inside xen, due to VTD page table is using 4K page
size.
I prefer the second solution, which is a more clean
way.
What’s your opinion?
Thanks,
Anthony