[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-ia64-devel] VTD is coming



Hi Anthony.

It's the interesting topic.
At first, let me say I haven't taken close look into
VT-d specification /x86 VT-d code yet.


You seems to be thinking about IPF specific implementation, right?
The x86 VT-d patches which was posted to xen-devel has separate
page table for VTD. I don't know its current development status, though.
Making it arch-generic, it might be reused.

pros:
easy and fast. Probably appropriate as 1st step.
Potentially we can have common code for both x86 and ia64.

cons:
The resulting code might be ugly. Later we want
cleaner code/performance, we might have to reimplement as 2nd step.

thanks.

On Thu, May 10, 2007 at 03:42:05PM +0800, Xu, Anthony wrote:
> 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
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 

> _______________________________________________
> Xen-ia64-devel mailing list
> Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-ia64-devel

-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.