aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xsm
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-01-28 13:47:24 +0000
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-01-28 13:47:24 +0000
commit14eb3b41d03f75b89928fad8f720f7d49598b0be (patch)
tree9ee446aae1f6ade9547d28a66f3b98bdea22993e /xen/include/xsm
parent0057a949dea2d22b1d9be884a7bd9912aa7f03cc (diff)
downloadxen-14eb3b41d03f75b89928fad8f720f7d49598b0be.tar.gz
xen-14eb3b41d03f75b89928fad8f720f7d49598b0be.tar.bz2
xen-14eb3b41d03f75b89928fad8f720f7d49598b0be.zip
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>
Diffstat (limited to 'xen/include/xsm')
-rw-r--r--xen/include/xsm/xsm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index df6cec22f3..566c8080f7 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -169,6 +169,7 @@ struct xsm_operations {
int (*update_va_mapping) (struct domain *d, struct domain *f,
l1_pgentry_t pte);
int (*add_to_physmap) (struct domain *d1, struct domain *d2);
+ int (*remove_from_physmap) (struct domain *d1, struct domain *d2);
int (*sendtrigger) (struct domain *d);
int (*bind_pt_irq) (struct domain *d, struct xen_domctl_bind_pt_irq *bind);
int (*unbind_pt_irq) (struct domain *d);
@@ -738,6 +739,11 @@ static inline int xsm_add_to_physmap(struct domain *d1, struct domain *d2)
return xsm_call(add_to_physmap(d1, d2));
}
+static inline int xsm_remove_from_physmap(struct domain *d1, struct domain *d2)
+{
+ return xsm_call(remove_from_physmap(d1, d2));
+}
+
static inline int xsm_sendtrigger(struct domain *d)
{
return xsm_call(sendtrigger(d));