]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commit
xen: reinstate previously unused XENMEM_remove_from_physmap hypercall
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Sat, 28 Jan 2012 13:47:24 +0000 (13:47 +0000)
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>
Sat, 28 Jan 2012 13:47:24 +0000 (13:47 +0000)
commit14eb3b41d03f75b89928fad8f720f7d49598b0be
tree9ee446aae1f6ade9547d28a66f3b98bdea22993e
parent0057a949dea2d22b1d9be884a7bd9912aa7f03cc
xen: reinstate previously unused XENMEM_remove_from_physmap hypercall

This patch reinstates the XENMEM_remove_from_physmap hypercall
which was removed in 19041:ee62aaafff46 because it was not used.

However, is now needed in order to support xenstored stub domains.
The xenstored stub domain is not priviliged like dom0 and so cannot
unilaterally map the xenbus page of other guests into it's address
space.  Therefore, before creating a domU the domain builder needs to
seed its grant table with a grant ref allowing the xenstored stub
domain to access the new domU's xenbus page.

At present domU's do not start with their grant table mapped.
Instead it gets mapped when the guest requests a grant table from
the hypervisor.

In order to seed the grant table, the domain builder first needs to
map it into dom0 address space.  But the hypercall to do this
requires a gpfn (guest pfn), which is an mfn for PV guest, but a pfn
for HVM guests.  Therfore, in order to seed the grant table of an
HVM guest, dom0 needs to *temporarily* map it into the guest's
"physical" address space.

Hence the need to reinstate the XENMEM_remove_from_physmap hypercall.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/common/compat/memory.c
xen/common/memory.c
xen/include/asm-ia64/mm.h
xen/include/public/memory.h
xen/include/xlat.lst
xen/include/xsm/xsm.h
xen/xsm/dummy.c
xen/xsm/flask/hooks.c