This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


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

To: "pradeep singh rautela" <rautelap@xxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>, xenkernelnewbies@xxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] swiotlb and Xen query?
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Wed, 2 May 2007 14:58:28 +0200
Delivery-date: Wed, 02 May 2007 05:57:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <6bc632150705020549l63456f8dkcf40750cb6fdc9d6@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AceMuF02tyYWE4DzQ7qJr1rQ1021nwAAJhqw
Thread-topic: [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

<Prev in Thread] Current Thread [Next in Thread>