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

[Xen-devel] Re: HYBRID: gnttab_map() to map shared frames..

To: Keir Fraser <keir.xen@xxxxxxxxx>
Subject: [Xen-devel] Re: HYBRID: gnttab_map() to map shared frames..
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Fri, 14 Oct 2011 14:17:29 +0100
Cc: "Xen-devel@xxxxxxxxxxxxxxxxxxx" <Xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 14 Oct 2011 06:20:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CABDA859.22DA3%keir.xen@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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <CABDA859.22DA3%keir.xen@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2011-10-14 at 08:50 +0100, Keir Fraser wrote:
> If you are running without autotranslate paging mode then the p2m will be
> 1:1 and there is no problem. If you are running autotranslate then yes you
> probably need the HVM style of mapping.

The issue is that with an HVM guest there is no guest visibility of MFN
space and PFN space is not managed by the hypervisor, so you need an
add_to_physmap style call in order to point the hypervisor at some PFN
space which it can use as the grant table. You then get this same PFN
space back from GNTTABOP_setup_table and from then on PV and HVM look
much the same. (I'm sure you know this, I'm just thinking out loud).

For a hybrid guest it's not quite true that PFN space is not managed by
the hypervisor -- we could, at least in theory, use the hypervisor hole
and "allocate" ourselves some pfn space for the grant table in there.
Couldn't we?

Ian.

> 
>  -- Keir
> 
> On 14/10/2011 02:18, "Mukesh Rathor" <mukesh.rathor@xxxxxxxxxx> wrote:
> 
> > Hi,
> > 
> > I am trying to figure how to make gnttab_map() work for Hybrid with EPT.
> > The only way I am coming up is the HVM way, where I would have to get
> > mmio_addr via pci_resource_start() which means registering xen-platform-pci
> > driver. I know there will be implications later with migration, but thats
> > later.
> > 
> > I can't think of any other way since the grant frames are coming from
> > xen heap and not in p2m table, other than some sort of
> > xen-heap-p2m-table or something ugly.
> > 
> > Am I on right track, or any other ideas?
> > 
> > thanks,
> > Mukesh
> > 
> 
> 



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