From: Ian Campbell Subject: Re: HYBRID: gnttab_map() to map shared frames.. Date: Tue, 18 Oct 2011 09:13:02 +0100 Message-ID: <1318925582.16132.31.camel@zakaz.uk.xensource.com> References: <20111013181853.15381ef5@mantra.us.oracle.com> <20111017191810.28876947@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111017191810.28876947@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 03:18 +0100, Mukesh Rathor wrote: > Hi Jeremy, > > You have any thoughts on this? This is basically for hybrid running > autotranslate paging mode. I am trying to figure how to get unmapped > pfns to map shared grant table page/s from xen. HVM does this via > pci_resource_start() and gets io remapped address. However, in case of > pure PV, I am not sure how feasible this approach would be. > > Is there way I can reserve few pfn's above max_pfn and use those > for my XENMAPSPACE_grant_table call? I think we should avoid exposing any sort of magic PCI bus to PV/hybrid guests. 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? 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. Ian.