From: Andrew Cooper Date: Wed, 1 Mar 2017 18:01:51 +0000 (+0000) Subject: x86/shadow: Drop VALID_GFN() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1059dd9635dd205bce9cedd95e054496cfdd5a80;p=people%2Froyger%2Fxen.git x86/shadow: Drop VALID_GFN() There is only one single user of VALID_GFN(). Inline the macro to remove the added layer of indirection in sh_gva_to_gfn() Signed-off-by: Andrew Cooper Acked-by: Tim Deegan --- diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index d9bf212b0e..63c7ab5aac 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -3728,7 +3728,7 @@ sh_gva_to_gfn(struct vcpu *v, struct p2m_domain *p2m, #if (SHADOW_OPTIMIZATIONS & SHOPT_VIRTUAL_TLB) /* Check the vTLB cache first */ unsigned long vtlb_gfn = vtlb_lookup(v, va, *pfec); - if ( VALID_GFN(vtlb_gfn) ) + if ( vtlb_gfn != gfn_x(INVALID_GFN) ) return vtlb_gfn; #endif /* (SHADOW_OPTIMIZATIONS & SHOPT_VIRTUAL_TLB) */ diff --git a/xen/include/asm-x86/guest_pt.h b/xen/include/asm-x86/guest_pt.h index 6a06ba037f..bedc771960 100644 --- a/xen/include/asm-x86/guest_pt.h +++ b/xen/include/asm-x86/guest_pt.h @@ -32,8 +32,6 @@ #error GUEST_PAGING_LEVELS not defined #endif -#define VALID_GFN(m) (m != gfn_x(INVALID_GFN)) - static inline paddr_t gfn_to_paddr(gfn_t gfn) {