aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xsm
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-04-23 11:56:05 +0200
committerJan Beulich <jbeulich@suse.com>2013-04-23 11:56:05 +0200
commit3f28d0077788e7f8cd3ee25b023a4225d7e26e87 (patch)
tree56758394d52f0aed5f71ad2763a54d76c07d8810 /xen/include/xsm
parent4bc22a50ebc1fb1695d59f69105797e208021edb (diff)
downloadxen-3f28d0077788e7f8cd3ee25b023a4225d7e26e87.tar.gz
xen-3f28d0077788e7f8cd3ee25b023a4225d7e26e87.tar.bz2
xen-3f28d0077788e7f8cd3ee25b023a4225d7e26e87.zip
x86: remove IS_PRIV_FOR references
The check in guest_physmap_mark_populate_on_demand is redundant, since its only caller is populate_physmap whose only caller checks the xsm_memory_adjust_reservation hook prior to calling. Add a new XSM hook for the other two checks since they allow privileged domains to arbitrarily map a guest's memory. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> (release perspective)
Diffstat (limited to 'xen/include/xsm')
-rw-r--r--xen/include/xsm/dummy.h6
-rw-r--r--xen/include/xsm/xsm.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 191e493b43..9cae61cd5c 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -574,6 +574,12 @@ static XSM_INLINE int xsm_update_va_mapping(XSM_DEFAULT_ARG struct domain *d, st
return xsm_default_action(action, d, f);
}
+static XSM_INLINE int xsm_priv_mapping(XSM_DEFAULT_ARG struct domain *d, struct domain *t)
+{
+ XSM_ASSERT_ACTION(XSM_TARGET);
+ return xsm_default_action(action, d, t);
+}
+
static XSM_INLINE int xsm_bind_pt_irq(XSM_DEFAULT_ARG struct domain *d, struct xen_domctl_bind_pt_irq *bind)
{
XSM_ASSERT_ACTION(XSM_HOOK);
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index fdc7a650d6..5103070243 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -154,6 +154,7 @@ struct xsm_operations {
struct domain *f, uint32_t flags);
int (*mmuext_op) (struct domain *d, struct domain *f);
int (*update_va_mapping) (struct domain *d, struct domain *f, l1_pgentry_t pte);
+ int (*priv_mapping) (struct domain *d, struct domain *t);
int (*bind_pt_irq) (struct domain *d, struct xen_domctl_bind_pt_irq *bind);
int (*unbind_pt_irq) (struct domain *d, struct xen_domctl_bind_pt_irq *bind);
int (*ioport_permission) (struct domain *d, uint32_t s, uint32_t e, uint8_t allow);
@@ -582,6 +583,11 @@ static inline int xsm_update_va_mapping(xsm_default_t def, struct domain *d, str
return xsm_ops->update_va_mapping(d, f, pte);
}
+static inline int xsm_priv_mapping(xsm_default_t def, struct domain *d, struct domain *t)
+{
+ return xsm_ops->priv_mapping(d, t);
+}
+
static inline int xsm_bind_pt_irq(xsm_default_t def, struct domain *d,
struct xen_domctl_bind_pt_irq *bind)
{