WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] hvmloader: Fix e820_collapse() to not los

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvmloader: Fix e820_collapse() to not lose E820 entries.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 24 Apr 2007 10:50:19 -0700
Delivery-date: Tue, 24 Apr 2007 10:50:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1177407287 -3600
# Node ID fe4784ff9fd3996bc7960a4e2b42ad56ecf5aef9
# Parent  4f7fd7d27fd08cfb76d88f5e2580f35f403ab347
hvmloader: Fix e820_collapse() to not lose E820 entries.
Fixes bugzilla bug #971.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/firmware/hvmloader/util.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 4f7fd7d27fd0 -r fe4784ff9fd3 tools/firmware/hvmloader/util.c
--- a/tools/firmware/hvmloader/util.c   Tue Apr 24 09:50:56 2007 +0100
+++ b/tools/firmware/hvmloader/util.c   Tue Apr 24 10:34:47 2007 +0100
@@ -295,7 +295,7 @@ static void e820_collapse(void)
              ((ent[i].addr + ent[i].size) == ent[i+1].addr) )
         {
             ent[i].size += ent[i+1].size;
-            memcpy(&ent[i+1], &ent[i+2], *E820_MAP_NR - i - 2);
+            memcpy(&ent[i+1], &ent[i+2], (*E820_MAP_NR-i-2) * sizeof(*ent));
             (*E820_MAP_NR)--;
         }
         else
@@ -322,10 +322,10 @@ uint32_t e820_malloc(uint32_t size)
              (addr != ent[i].addr) ||     /* starts above 4gb? */
              ((addr + size) < addr) )     /* ends above 4gb? */
             continue;
-        
+
         if ( ent[i].size != size )
         {
-            memmove(&ent[i+1], &ent[i], (*E820_MAP_NR - i) * sizeof(*ent));
+            memmove(&ent[i+1], &ent[i], (*E820_MAP_NR-i) * sizeof(*ent));
             (*E820_MAP_NR)++;
             ent[i].size -= size;
             addr += ent[i].size;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] hvmloader: Fix e820_collapse() to not lose E820 entries., Xen patchbot-unstable <=