From: Tim Deegan Subject: Re: Accessing Dom0 Physical memory from xen, via direct mappings (PML4:262-271) Date: Wed, 14 Mar 2012 09:00:44 +0000 Message-ID: <20120314090044.GC71026@ocelot.phlegethon.org> References: <02FF9937-5F09-4CB1-93ED-A55FCC6F625C@cs.ubc.ca> <20120313160817.GA71026@ocelot.phlegethon.org> <20120313164322.GB71026@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Shriram Rajagopalan Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org At 20:04 -0700 on 13 Mar (1331669099), Shriram Rajagopalan wrote: > On Tue, Mar 13, 2012 at 9:43 AM, Tim Deegan wrote: > > At 09:32 -0700 on 13 Mar (1331631148), Shriram Rajagopalan wrote: > > > Can I have xen allocate this huge buffer ? (a byte per 8-byte word means > > > about > > > 128M for a 1G guest). And if I were to have this byte-map per-vcpu, it > > > would mean > > > 512M worth of RAM, for a 4-vcpu guest. > > > > > > Is there a way I could increase the xen heap size to be able to allocate > > > this much memory? > > > > IIRC on x64 xen heap is the same as domheap so it already includes all > > free space. Or you could pick a 1GB region at boot time, make sure it > > doesn't get given to the memory allocators, and then mark it all as > > owned by dom0 in the frametable. > > > > > xen heap seems to be the same domheap. however, when I try to allocate > more than 128MB of memory, it punts! > I am using the alloc_xenheap_pages(order, 0). > Am I missing something here ? > > I am not sure if Andres' XENMEM_exchange mechanism allows >128MB. It has to use the allocator to get the contiguous memory, so if you can't get that memory directle, xenmem_exchange won't work either. Tim.