Skip to contentSkip to conversation

vmap granted pages

DISCUSSION Anastassios Nanos 1 participant 1 message May 29, 2012

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm trying to reconstruct a user-level, virtually contiguous space from guest A to guest B using pages that have been granted.

Is this possible with vmap ? I was thinking something like the following:

guest A:

a) get vaddr from userspace, construct page_list
b) grant each page to guest B (using for instance the following):

for each page:
mfn = pfn_to_mfn(page_to_pfn(page));
gref = gnttab_grant_foreign_access(domid, mfn, 0);

(magically transfer nr_pages and grefs to guest B)

guest B:

c) accept the grants and construct a page_list

for each page:
pages <- {accept grant}

d) create a kernel virtual space that is comprised by the previous page_list:

vaddr = vmap(page_list, nr_pages, VM_MAP, PAGE_KERNEL);

Is there something I'm missing on the previous scenario?

cheers,
A.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAk/E3LEACgkQCNbwM8zOdZ0QIwCggRkR+H/HDLXBXTsdKhHVqHEV zDoAniCQmZPnZW/G37g8WwMFfZjSUtSQ
=mVsH
-----END PGP SIGNATURE-----