Skip to contentSkip to conversation

xen/p2m: Using INVALID_MFN instead of mfn_valid

PATCH Superseded Xudong Hao 1 participant 1 message Aug 15, 2012

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Xudong Hao

author
#0 lore raw

PATCH 2/3 xen/p2m: Using INVALID_MFN instead of mfn_valid

64 bits big bar's MMIO address may out of the highest gfn, then mfn_valid may return failure, so using INVALID_MFN to measure.

xen/arch/x86/mm/p2m-ept.c +1 -1
diff -r 663eb766cdde xen/arch/x86/mm/p2m-ept.c
@@ -428,7 +428,7 @@ ept_set_entry(struct p2m_domain *p2m, un
     }
 
     /* Track the highest gfn for which we have ever had a valid mapping */
-    if ( mfn_valid(mfn_x(mfn)) &&
+    if ( (mfn_x(mfn) != INVALID_MFN) &&
          (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) )
         p2m->max_mapped_pfn = gfn + (1UL << order) - 1;