[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/mm: update max_mapped_pfn on MMIO mappings too.
# HG changeset patch # User Tim Deegan <tim@xxxxxxx> # Date 1345123869 -3600 # Node ID 8918737c7e80fb3e5fd410c6f386cd21afa0683a # Parent c887c30a0a35e74de786e0d240bbc51a8065a5fd 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@xxxxxxxxx> Signed-off-by: Tim Deegan <tim@xxxxxxx> Committed-by: Tim Deegan <tim@xxxxxxx> --- diff -r c887c30a0a35 -r 8918737c7e80 xen/arch/x86/mm/p2m-ept.c --- a/xen/arch/x86/mm/p2m-ept.c Thu Aug 16 10:16:19 2012 +0200 +++ b/xen/arch/x86/mm/p2m-ept.c Thu Aug 16 14:31:09 2012 +0100 @@ -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 ( p2mt != p2m_invalid && (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) ) p2m->max_mapped_pfn = gfn + (1UL << order) - 1; diff -r c887c30a0a35 -r 8918737c7e80 xen/arch/x86/mm/p2m-pt.c --- a/xen/arch/x86/mm/p2m-pt.c Thu Aug 16 10:16:19 2012 +0200 +++ b/xen/arch/x86/mm/p2m-pt.c Thu Aug 16 14:31:09 2012 +0100 @@ -454,7 +454,7 @@ p2m_set_entry(struct p2m_domain *p2m, un } /* 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; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |