[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Mapping another domain's user memory
On Thu, 2008-01-31 at 09:57 -0500, Michael Abd-El-Malek wrote: > Hello, > > Is it possible to map another domain's user-level memory into a > different domain's kernel? (For clarity, let the source domain be the > one with the user-space pages that a destination domain wants to write > to.) > > I tried to do that by first getting a grant for the user-space memory > in the source domain as follows: > > page_start = user_buf; > buffer_mfn = virt_to_mfn(page_start); > gnttab_grant_foreign_access_ref(grant_ref, info->dev->otherend_id, > buffer_mfn, 0); this functions wants a guest page frame number, not the mfn, e.g. via page_to_pfn(). > But the virt_to_mfn call asserted, in include/asm-x86_64/mach-xen/asm/ > maddr.h:pfn_to_mfn. > The assertion that failed was: BUG_ON(end_pfn && pfn >= end_pfn); > > So a few questions: > 1) is it even possible to map a domain's user-space page into another > domain? yes, any, by dom0, or else via grants. > 2) for the above code snippet to work, must I install some mappings in > the source domain first? no, afaik it does not have to be mapped, just owned. > 3) does the blktap driver do something similar? I tried looking at the > blktap driver, because it looked like it might help. But I'm new to > the Xen memory management code so it was a bit difficult to follow. not sure about blktap, but {blk|net}front should give you examples of how the above code is supposed to be used. grants are typically created by the frontend, as the backend drivers won't dedicate memory of the driver domain to that purpose. regards, daniel -- Daniel Stodden LRR - Lehrstuhl fÃr Rechnertechnik und Rechnerorganisation Institut fÃr Informatik der TU MÃnchen D-85748 Garching http://www.lrr.in.tum.de/~stodden mailto:stodden@xxxxxxxxxx PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |