[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] x86/mm: update max_mapped_pfn on MMIO mappings too.


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
  • Date: Thu, 20 Sep 2012 17:22:15 +0000
  • Delivery-date: Thu, 20 Sep 2012 17:22:23 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Tim Deegan <tim@xxxxxxx>
# Date 1348131039 -7200
# Node ID 337fe1dc46d77269f39f6c2a6babf47a032d535a
# Parent  d7b754c813be89e00ea7422e07273762c979fdc0
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>
xen-unstable changeset: 25756:8918737c7e80
xen-unstable date: Thu Aug 16 13:31:09 UTC 2012
---


diff -r d7b754c813be -r 337fe1dc46d7 xen/arch/x86/mm/hap/p2m-ept.c
--- a/xen/arch/x86/mm/hap/p2m-ept.c     Thu Sep 20 10:49:17 2012 +0200
+++ b/xen/arch/x86/mm/hap/p2m-ept.c     Thu Sep 20 10:50:39 2012 +0200
@@ -449,7 +449,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 d7b754c813be -r 337fe1dc46d7 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Thu Sep 20 10:49:17 2012 +0200
+++ b/xen/arch/x86/mm/p2m.c     Thu Sep 20 10:50:39 2012 +0200
@@ -1521,7 +1521,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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.