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

[Xen-changelog] [xen-unstable] hvmloader: Fix e820_malloc() after bug I introduced in c/s 18383



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1219846573 -3600
# Node ID 6c50c7d089d99a1428d9201ab302c8d226a9f15f
# Parent  ab8212bd5604f58635e2b8bc6ffec6eddd211cf9
hvmloader: Fix e820_malloc() after bug I introduced in c/s 18383
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/firmware/hvmloader/util.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r ab8212bd5604 -r 6c50c7d089d9 tools/firmware/hvmloader/util.c
--- a/tools/firmware/hvmloader/util.c   Wed Aug 27 15:02:38 2008 +0100
+++ b/tools/firmware/hvmloader/util.c   Wed Aug 27 15:16:13 2008 +0100
@@ -337,7 +337,7 @@ uint32_t e820_malloc(uint32_t size, uint
 
     for ( i = *HVM_E820_NR - 1; i >= 0; i-- )
     {
-        addr = (ent[i].size - size) & ~(align-1);
+        addr = (ent[i].addr + ent[i].size - size) & ~(align-1);
         if ( (ent[i].type != E820_RAM) || /* not ram? */
              (addr < ent[i].addr) ||      /* too small or starts above 4gb? */
              ((addr + size) < addr) )     /* ends above 4gb? */

_______________________________________________
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®.