[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86/mem_access: move p2m_mem_access_sanity_check() from header
commit 56d2e9786a3ba7b9a92ea3e9fac18e2892f9f38b Author: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> AuthorDate: Wed Nov 21 10:55:21 2018 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Nov 21 10:55:21 2018 +0100 x86/mem_access: move p2m_mem_access_sanity_check() from header 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@xxxxxxxxxxxxxxx> Acked-by: Tamas K Lengyel <tamas@xxxxxxxxxxxxx> --- xen/arch/x86/mm/mem_access.c | 5 +++++ xen/include/asm-x86/mem_access.h | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c index 2f1295e56a..30c2f1a137 100644 --- a/xen/arch/x86/mm/mem_access.c +++ b/xen/arch/x86/mm/mem_access.c @@ -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 diff --git a/xen/include/asm-x86/mem_access.h b/xen/include/asm-x86/mem_access.h index 4043c9fb4d..c815db87c5 100644 --- a/xen/include/asm-x86/mem_access.h +++ b/xen/include/asm-x86/mem_access.h @@ -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__ */ -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |