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] Re: Linux Stubdom Problem

To: Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: Linux Stubdom Problem
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 26 Aug 2011 17:12:00 +0100
Cc: Ian, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Campbell <Ian.Campbell@xxxxxxxxxxxxx>, "Xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jiageng Yu <yujiageng734@xxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxx>, Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Delivery-date: Fri, 26 Aug 2011 09:06:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1108231350380.12963@kaball-desktop>
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>
References: <alpine.DEB.2.00.1107291601070.12963@kaball-desktop> <CAJ0pt15t_7==0rX9qEHyDMBRWUgfpMyLCmP0yBJsZg410FoutA@xxxxxxxxxxxxxx> <alpine.DEB.2.00.1107291617130.12963@kaball-desktop> <CAJ0pt15MVvw5_rJ_xFxR6aQpRYtTWFmR0OHJ54wuXSE+7hNkGQ@xxxxxxxxxxxxxx> <alpine.DEB.2.00.1107291628000.12963@kaball-desktop> <CAJ0pt155eqcyUwd-m--m3n+t-hLYixe+xA8J5MWgEWj58+o_Gw@xxxxxxxxxxxxxx> <CAJ0pt14OXshWn5NQ3JSfqRNdHkWMyhKWC0OwMixu9Xmk0b1oqw@xxxxxxxxxxxxxx> <alpine.DEB.2.00.1108190027450.12963@kaball-desktop> <CAJ0pt16CLqt+bHUwvO_V=c39CqN4Y4BCgbcSW26wik4hFTHq_g@xxxxxxxxxxxxxx> <alpine.DEB.2.00.1108221834340.12963@kaball-desktop> <20110823100719.GD96414@xxxxxxxxxxxxxxxxxxxxx> <alpine.DEB.2.00.1108231350380.12963@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Tue, 23 Aug 2011, Stefano Stabellini wrote:
> On Tue, 23 Aug 2011, Tim Deegan wrote:
> > At 20:36 +0100 on 22 Aug (1314045383), Stefano Stabellini wrote:
> > > The current implementation of IOCTL_PRIVCMD_MMAPBATCH is only capable of
> > > mapping foreign mfns into the address space of the caller, while we need
> > > to remap a set of pages already mapped in the address space of the
> > > caller to some gmfns of a foreign domain. In other words we need the
> > > same functionality but in the other direction.
> > 
> > I think I was confused whan you told me about this yesterday.  Do you
> > need to map some of the linux-qemu-dom's memory into the guest?
> > In that case, I think you can just grant the pages to the guest VM and
> > use XENMAPSPACE_grant_table to map them. 
> 
> Yes, the pages I need to map into the guest have been vmalloc'ed by
> xen_fbfront and mmap'ed into Qemu.
> I didn't realize we could use any gmfn we wanted with
> XENMAPSPACE_grant_table.
> 
> Jiageng: in the Linux implementation of the new ioctl, you can just call
> gnttab_grant_foreign_access to grant access to the guest to framebuffer,
> then you can use HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp) with
> XENMAPSPACE_grant_table and the returned grant reference as idx to map
> the pages into the guest.
> 

It looks like XENMAPSPACE_grant_table is actually meant to map grant
table pages, meaning pages that are part of the grant table, not pages
that are referenced by the grant table.
So as it is we cannot use XENMAPSPACE_grant_table.

Unless you have another suggestion, or there are ref counting issues,
like Keir hinted, I think we should just go with implementing
XENMAPSPACE_mfn.

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