WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Question regarding SLAB corruption

To: Lukas Hejtmanek <xhejtman@xxxxxxxxxxx>
Subject: Re: [Xen-devel] Question regarding SLAB corruption
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Mon, 09 Jul 2007 09:31:16 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 09 Jul 2007 01:29:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070709073804.GZ3885@xxxxxxxxxxx>
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: AcfCA4QUwoRIbi32EdyVxQAX8io7RQ==
Thread-topic: [Xen-devel] Question regarding SLAB corruption
User-agent: Microsoft-Entourage/11.3.3.061214
On 9/7/07 08:38, "Lukas Hejtmanek" <xhejtman@xxxxxxxxxxx> wrote:

> On Sun, Jul 08, 2007 at 11:11:58AM +0100, Keir Fraser wrote:
>> DomU sets up its own DMAs. The BARs do not come into it (except that they
>> will indicate where device registers are, and that's how the DMA is
>> programmed).
> 
> One of maintainers of IB driver suggested a theory. What is the way that Xen
> allocates memory? Are there guarantees about allocation of physical contiguous
> memory? E.g., if I request alloc_pages(GPF_KERNEL, 6) - (256kB), are these
> pages physically contiguous? Or are these pages guest contiguous only?

Nope. To get contiguous pages on Xen you need to use pci_alloc_consistent,
or pci_map_single, or similar. Most drivers are okay with this, because you
are not supposed to program DMA without having got a dma_addr_t from Linux's
DMA API, and we hook into the DMA API to serve up contiguous regions (via
the swiotlb [ie. bounce buffers], if necessary).

 -- Keir


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