[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 08/16] xen/mem_access: Abstract architecture specific sanity check
Signed-off-by: Tamas K Lengyel <tklengyel@xxxxxxxxxxxxx> --- 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 | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/common/mem_access.c b/xen/common/mem_access.c index da5f363..80ccc30 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 14be50f..2789723 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -625,6 +625,14 @@ static inline bool_t p2m_mem_event_sanity_check(struct domain *d) return 1; } +/* Sanity check for mem_access hardware support */ +static inline bool_t p2m_mem_access_sanity_check(struct domain *d) +{ + if ( !is_hvm_domain(d) ) + return 0; + return 1; +} + /* * 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 |