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

[Xen-changelog] [xen-unstable] xen: Fix my changes to I/O-region-finding routine.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1183466644 -3600
# Node ID 842e085dbb778ef848d58daaadfdd2b78f941ca3
# Parent  8adfd96f62ae8933b2a5bcdfcf71b15963956e75
xen: Fix my changes to I/O-region-finding routine.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff -r 8adfd96f62ae -r 842e085dbb77 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Tue Jul 03 12:04:03 2007 +0100
+++ b/xen/arch/x86/mm.c Tue Jul 03 13:44:04 2007 +0100
@@ -211,13 +211,12 @@ void __init arch_init_memory(void)
         share_xen_page_with_guest(mfn_to_page(i), dom_io, XENSHARE_writable);
  
     /* Any areas not specified as RAM by the e820 map are considered I/O. */
-    pfn = i = 0;
-    while ( pfn < max_page )
+    for ( i = 0, pfn = 0; pfn < max_page; i++ )
     {
         while ( (i < e820.nr_map) && (e820.map[i].type != E820_RAM) )
             i++;
 
-        if ( i == e820.nr_map )
+        if ( i >= e820.nr_map )
         {
             /* No more RAM regions: mark as I/O right to end of memory map. */
             rstart_pfn = rend_pfn = max_page;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.