From: Ian Campbell Subject: Re: HYBRID: gnttab_map() to map shared frames.. Date: Wed, 19 Oct 2011 09:39:33 +0100 Message-ID: <1319013573.3385.60.camel@zakaz.uk.xensource.com> References: <20111013181853.15381ef5@mantra.us.oracle.com> <20111017191810.28876947@mantra.us.oracle.com> <1318925582.16132.31.camel@zakaz.uk.xensource.com> <20111018121727.27a3f03c@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111018121727.27a3f03c@mantra.us.oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mukesh Rathor Cc: "Xen-devel@lists.xensource.com" , Keir Fraser , Jeremy Fitzhardinge List-Id: xen-devel@lists.xenproject.org On Tue, 2011-10-18 at 20:17 +0100, Mukesh Rathor wrote: > On Tue, 18 Oct 2011 09:13:02 +0100 > Ian Campbell wrote: > ... > > Could GNTTABOP_setup_table return GFNs from the very top of the GFN > > space? Perhaps even above what would be architecturally valid, > > although perhaps that is incompatible with HAP. Anything above > > max_pfn would seem to be valid for the hypervisor to place "magic" > > mappings in? > > Well, what's confusing me for this is that there are few max > pfn's inside the guest! The nr_pages being one for example, then > there's max_pfn in shared_info.arch. I'm not sure if these two are in > sync with max_pfn in mm/bootmem.c. Then, we would need to adjust EPT to add > these pfns there. So that may put a damper on this. What about using PFNs from right at the top, i.e. right up near 0xffffffff? I don't think there's any particular reason these special PFNs need to be contiguous with the "regular" ones. This would limit the total amount of RAM you could give a hybrid guest, but not by much. > > Another approach might be to take advantage of the fact that a modern > > PV kernel will call XENMEM_memory_map to obtain an e820 describing its > > pseudo-physical address space. You could arrange for there to be some > > reserved space returned in that. > > I saw e820 code last night, and wondered if this might be the best option. > I am glad you mentioned it. I am not much familiar with e820 format, so > studying it right now. > > thanks, > Mukesh >