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

Re: [Xen-devel] Question regarding SLAB corruption


  • To: Lukas Hejtmanek <xhejtman@xxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcfCA4QUwoRIbi32EdyVxQAX8io7RQ==
  • Thread-topic: [Xen-devel] Question regarding SLAB corruption

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


 


Rackspace

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