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

RE: [Xen-devel] swiotlb and Xen query?


> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> pradeep singh rautela
> Sent: 02 May 2007 13:49
> To: xen-devel; xenkernelnewbies@xxxxxxxxxxxxxxxx
> Subject: [Xen-devel] swiotlb and Xen query?
> Hi All,
> dom0 and domU uses swiotlb mechanism to emulate hardware 
> IOMMU, right? 
> And that so because the whole memory is visible to hypervisor 
> only and not to other domains, am i right? 

Not so. It uses swiotlb to allow 32-bit devices to access memory above
> My doubt is once the translation table between virtual and 
> physical addresses is set by the swiotlb.How does device 
> becomes aware of this table which is emulated in hardware as 
> a matter of fact using swiotlb.the device does not knows 
> about this table when accessing physical memory, isnt it? 

It works because swiotlb isn't at all a translation. Instead, it copies
the buffer of the requesting driver to a specifically allocated memory
region below 4GB. This new (low) memory location is what's being given
to the hardware device, so it never knew anything about the buffer
originally having been elsewhere. 

> Another question is - 
> dom0 and domU they both have their swiotlb mappings.This 
> means Xen also keeps record of a mapping between these two 
> tables in dom0 and domU? Am i right? Doesnt this means 
> wasting a lot of memory in allocating bounce buffers for 
> swiotlb during booting of dom0 and then during booting of domUs? 

There are no mappings of memory within swiotlb. 

And by the way, both Dom0 and DomU (in the para-virtual case) knows
exactly where the actual physical address is in the machine - the
hypervisor checks when the guest writes to its page-tables that the
memory is within that guest. 


> Please bear as i am just starting with the Xen code .
> Any pointers or links will be really helpful.
> Thank you
> ~psr
> -- 
> ---
> pradeep singh rautela
> "Genius is 1% inspiration, and 99% perspiration" - not me :) 

Xen-devel mailing list



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