]> xenbits.xensource.com Git - xen.git/commitdiff
mem_access: abstract architecture specific sanity check
authorTamas K Lengyel <tklengyel@sec.in.tum.de>
Fri, 26 Sep 2014 14:31:15 +0000 (16:31 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 26 Sep 2014 14:31:15 +0000 (16:31 +0200)
Signed-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>
Acked-by: Tim Deegan <tim@xen.org>
xen/common/mem_access.c
xen/include/asm-x86/p2m.h

index 64e5301467ec829df0ad140103706373f48c805d..6c2724bef5bf0d15347b18b8d61e334746ccf6d3 100644 (file)
@@ -70,7 +70,7 @@ int mem_access_memop(unsigned long cmd,
         return rc;
 
     rc = -EINVAL;
-    if ( !is_hvm_domain(d) )
+    if ( !p2m_mem_access_sanity_check(d) )
         goto out;
 
     rc = xsm_mem_event_op(XSM_DM_PRIV, d, XENMEM_access_op);
index f6136f9a49eb4b29545dacdf4f4fddd559c0310b..90ddd150298e6f6ac5effa2ec2d9ead847f110e8 100644 (file)
@@ -598,6 +598,12 @@ static inline bool_t p2m_mem_event_sanity_check(struct domain *d)
     return hap_enabled(d) && cpu_has_vmx;
 }
 
+/* Sanity check for mem_access hardware support */
+static inline bool_t p2m_mem_access_sanity_check(struct domain *d)
+{
+    return is_hvm_domain(d);
+}
+
 /* 
  * Internal functions, only called by other p2m code
  */