]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/mem_access: move p2m_mem_access_sanity_check() from header
authorRazvan Cojocaru <rcojocaru@bitdefender.com>
Wed, 21 Nov 2018 09:55:21 +0000 (10:55 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 21 Nov 2018 09:55:21 +0000 (10:55 +0100)
Move p2m_mem_access_sanity_check() from the asm-x86/mem_access.h
header, where it currently is declared inline, to
arch/x86/mm/mem_access.c. This allows source code that includes it
directly, or indirectly (such as xen/mem_access.h), to not worry
about also including sched.h for is_hvm_domain(). Including
xen/mem_access.h is useful for code wanting to use p2m_access_t.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
xen/arch/x86/mm/mem_access.c
xen/include/asm-x86/mem_access.h

index 2f1295e56a8078a08d1908dd0a04c92164ae4759..30c2f1a13708f1484ec547e47268838e5053e784 100644 (file)
@@ -541,6 +541,11 @@ void arch_p2m_set_access_required(struct domain *d, bool access_required)
 #endif
 }
 
+bool p2m_mem_access_sanity_check(struct domain *d)
+{
+    return is_hvm_domain(d) && cpu_has_vmx && hap_enabled(d);
+}
+
 /*
  * Local variables:
  * mode: C
index 4043c9fb4db086580360b69b3a016e50b107d7dc..c815db87c5c32346fb8f148fb67b9490960100be 100644 (file)
@@ -44,10 +44,7 @@ bool p2m_mem_access_emulate_check(struct vcpu *v,
                                   const vm_event_response_t *rsp);
 
 /* Sanity check for mem_access hardware support */
-static inline bool p2m_mem_access_sanity_check(struct domain *d)
-{
-    return is_hvm_domain(d) && cpu_has_vmx && hap_enabled(d);
-}
+bool p2m_mem_access_sanity_check(struct domain *d);
 
 #endif /*__ASM_X86_MEM_ACCESS_H__ */