mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86/mm: update max_mapped_pfn on MMIO mappings too.
max_mapped_pfn should reflect the highest mapping we've ever seen of any type, or the tests in the lookup functions will be wrong. As it happens, the highest mapping has always been a RAM one, but this is no longer the case when we allow 64-bit BARs. Reported-by: Xudong Hao <xudong.hao@intel.com> Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
This commit is contained in:
1 parent
9663bd3f47
commit
b6f3a3cbf0
2 files changed
+2
-2
No files matched your search
@@ -428,7 +428,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
|
||||
}
|
||||
|
||||
/* Track the highest gfn for which we have ever had a valid mapping */
|
||||
if ( mfn_valid(mfn_x(mfn)) &&
|
||||
if ( p2mt != p2m_invalid &&
|
||||
(gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) )
|
||||
p2m->max_mapped_pfn = gfn + (1UL << order) - 1;
|
||||
|
||||
|
||||
@@ -454,7 +454,7 @@ p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
|
||||
}
|
||||
|
||||
/* Track the highest gfn for which we have ever had a valid mapping */
|
||||
if ( mfn_valid(mfn)
|
||||
if ( p2mt != p2m_invalid
|
||||
&& (gfn + (1UL << page_order) - 1 > p2m->max_mapped_pfn) )
|
||||
p2m->max_mapped_pfn = gfn + (1UL << page_order) - 1;
|
||||
|
||||
|
||||