[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: Linux Stubdom Problem

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

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.