[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [V8 PATCH 4/8] pvh dom0: make xsm_map_gmfn_foreign available for x86



In this patch we make xsm_map_gmfn_foreign available for x86 also. This
is used in the next patch "pvh dom0: Add and remove foreign pages" in
function p2m_add_foreign.

Signed-off-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
---
 xen/include/xsm/dummy.h | 2 --
 xen/include/xsm/xsm.h   | 4 ----
 xen/xsm/dummy.c         | 2 --
 xen/xsm/flask/hooks.c   | 4 ----
 4 files changed, 12 deletions(-)

diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 3bcd941..eb7aeb8 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -622,10 +622,8 @@ static XSM_INLINE int xsm_ioport_mapping(XSM_DEFAULT_ARG 
struct domain *d, uint3
 
 #endif /* CONFIG_X86 */
 
-#ifdef CONFIG_ARM
 static XSM_INLINE int xsm_map_gmfn_foreign(XSM_DEFAULT_ARG struct domain *d, 
struct domain *t)
 {
     XSM_ASSERT_ACTION(XSM_TARGET);
     return xsm_default_action(action, d, t);
 }
-#endif
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index de9cf86..6281e29 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -164,9 +164,7 @@ struct xsm_operations {
     int (*ioport_permission) (struct domain *d, uint32_t s, uint32_t e, 
uint8_t allow);
     int (*ioport_mapping) (struct domain *d, uint32_t s, uint32_t e, uint8_t 
allow);
 #endif
-#ifdef CONFIG_ARM
     int (*map_gmfn_foreign) (struct domain *d, struct domain *t);
-#endif
 };
 
 #ifdef XSM_ENABLE
@@ -630,12 +628,10 @@ static inline int xsm_ioport_mapping (xsm_default_t def, 
struct domain *d, uint3
 }
 #endif /* CONFIG_X86 */
 
-#ifdef CONFIG_ARM
 static inline int xsm_map_gmfn_foreign (xsm_default_t def, struct domain *d, 
struct domain *t)
 {
     return xsm_ops->map_gmfn_foreign(d, t);
 }
-#endif /* CONFIG_ARM */
 
 #endif /* XSM_NO_WRAPPERS */
 
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index 3fe4c59..0234490 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -134,7 +134,5 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     set_to_dummy_if_null(ops, ioport_permission);
     set_to_dummy_if_null(ops, ioport_mapping);
 #endif
-#ifdef CONFIG_ARM
     set_to_dummy_if_null(ops, map_gmfn_foreign);
-#endif
 }
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 96276ac..df92953 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1450,12 +1450,10 @@ static int flask_unbind_pt_irq (struct domain *d, 
struct xen_domctl_bind_pt_irq
 }
 #endif /* CONFIG_X86 */
 
-#ifdef CONFIG_ARM
 static int flask_map_gmfn_foreign(struct domain *d, struct domain *t)
 {
     return domain_has_perm(d, t, SECCLASS_MMU, MMU__MAP_READ | MMU__MAP_WRITE);
 }
-#endif
 
 long do_flask_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_flask_op);
 int compat_flask_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_flask_op);
@@ -1566,9 +1564,7 @@ static struct xsm_operations flask_ops = {
     .ioport_permission = flask_ioport_permission,
     .ioport_mapping = flask_ioport_mapping,
 #endif
-#ifdef CONFIG_ARM
     .map_gmfn_foreign = flask_map_gmfn_foreign,
-#endif
 };
 
 static __init int flask_init(void)
-- 
1.8.3.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.