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] How to allocate contiguous RAM in pv guests

To: "Uli" <um@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] How to allocate contiguous RAM in pv guests
From: "Guy Zana" <guy@xxxxxxxxxxxx>
Date: Tue, 30 Jan 2007 05:28:16 -0500
Delivery-date: Tue, 30 Jan 2007 02:28:47 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070129145440.GC21690@xxxxxxxxx>
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: AcdDtY5zeIDqzsl3QMm5uOLPmEfjVwAo8h6w
Thread-topic: [Xen-devel] How to allocate contiguous RAM in pv guests
Hi,

An idea is to scan the bios e820 table and split a large block to reserve those 
64MB.
Than, you can mark this block as E820_GART or something and add your own 
allocator next to the xen-heap allocator.
To map it contigiously, you can use the fixmap from the I/O remapping area.
Is this what you need?

Thanks,
Guy. 

> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Uli
> Sent: Monday, January 29, 2007 4:55 PM
> To: xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-devel] How to allocate contiguous RAM in pv guests
> 
> Hi!
> 
> I'm working on a patch to get the GART as an IOMMU working in 
> linux/dom0.
> However, the problem I describe below applies equally to the 
> software IOMMU.
> 
> If the BIOS doesn't setup the aperture it has to be allocated 
> from memory. Therefore, one needs a contiguous memory region, 
> currently 64MB.
> The software IOMMU always needs a contiguous memory region 
> (same size).
> 
> In order to do this, the hypercall XENMEM_exchange is given a 
> bunch of mfns and returns a (host physically) contiguous 
> memory region.
> Unfortunately, the implementation allocates the contiguous 
> memory from the heap first and then returns the discontiguous 
> mfns to it. Therefore, there has to be a (in this case) 64MB 
> chunk of memory in the xen heap available for the call to succeed.
> I have observed that on most machines exactly one such chunk 
> is available. However, I've also had a machine where this is 
> not the case.
> 
> It seems to me that using the xen heap is not the right thing to do.
> The only other option I can think of is scanning dom0's 
> memory for a (host physical) chunk of memory that
> a) belongs entirely to it and
> b) is free
> 
> Once such a chunk is found, one would have to map it 
> contiguously into virtual memory.  Actually, the latter is 
> only neccessary for the software IOMMU. The GART aperture 
> doesn't have to be in virtual memory since it is only 
> accessed from devices.
> 
> Thanks for any suggestions,
> 
> Uli
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> 

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

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