From: Tamas K Lengyel Date: Fri, 26 Sep 2014 14:31:15 +0000 (+0200) Subject: mem_access: abstract architecture specific sanity check X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4308 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1fc04d0a8dd8aaebae0af3cc69fcfedc0eab9156;p=xen.git mem_access: abstract architecture specific sanity check Signed-off-by: Tamas K Lengyel Acked-by: Tim Deegan --- diff --git a/xen/common/mem_access.c b/xen/common/mem_access.c index 64e5301467..6c2724bef5 100644 --- a/xen/common/mem_access.c +++ b/xen/common/mem_access.c @@ -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); diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h index f6136f9a49..90ddd15029 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -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 */