[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 08/17] xen/mem_access: Abstract architecture specific sanity check
Signed-off-by: Tamas K Lengyel <tklengyel@xxxxxxxxxxxxx> --- v5: Style fix. v4: Style fix. v2: Move sanity check function into architecture specific p2m.h --- xen/common/mem_access.c | 2 +- xen/include/asm-x86/p2m.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/xen/common/mem_access.c b/xen/common/mem_access.c index c84fab3..fc6b207 100644 --- a/xen/common/mem_access.c +++ b/xen/common/mem_access.c @@ -68,7 +68,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 02d23d1..6f9ed39 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -618,6 +618,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 */ -- 2.1.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |