]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/shadow: Drop VALID_GFN()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 1 Mar 2017 18:01:51 +0000 (18:01 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 23 Mar 2017 17:25:59 +0000 (17:25 +0000)
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 <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/multi.c
xen/include/asm-x86/guest_pt.h

index d9bf212b0e98f54fb153e3b4ae9f69ef3e89f90f..63c7ab5aacdcf5f02efca763d84422863e3cfdca 100644 (file)
@@ -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) */
 
index 6a06ba037fc4c798ba0d2843b254ecc078dfc651..bedc7719608bc7a14590e547fee9b0f54dfb7091 100644 (file)
@@ -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)
 {