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] [LIBXC] Fix memory alloc/dealloc routines

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LIBXC] Fix memory alloc/dealloc routines to return error properly.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Nov 2006 12:30:28 +0000
Delivery-date: Tue, 07 Nov 2006 04:32:01 -0800
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
# Node ID 5a41ea282c86bfb3603bdd5feb9199ac8f80e86d
# Parent  e796d9c2f5e8e06939a2ba8fcdbd4c024361571d
[LIBXC] Fix memory alloc/dealloc routines to return error properly.
Remove unnecessary decrease_reservation() from hvm builder.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/libxc/xc_domain.c    |    8 ++++----
 tools/libxc/xc_hvm_build.c |    9 ---------
 2 files changed, 4 insertions(+), 13 deletions(-)

diff -r e796d9c2f5e8 -r 5a41ea282c86 tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Tue Nov 07 11:19:26 2006 +0000
+++ b/tools/libxc/xc_domain.c   Tue Nov 07 11:54:52 2006 +0000
@@ -349,7 +349,7 @@ int xc_domain_memory_increase_reservatio
     if ( err == nr_extents )
         return 0;
 
-    if ( err > 0 )
+    if ( err >= 0 )
     {
         DPRINTF("Failed allocation for dom %d: "
                 "%ld pages order %d addr_bits %d\n",
@@ -388,11 +388,11 @@ int xc_domain_memory_decrease_reservatio
     if ( err == nr_extents )
         return 0;
 
-    if ( err > 0 )
+    if ( err >= 0 )
     {
         DPRINTF("Failed deallocation for dom %d: %ld pages order %d\n",
                 domid, nr_extents, extent_order);
-        errno = EBUSY;
+        errno = EINVAL;
         err = -1;
     }
 
@@ -419,7 +419,7 @@ int xc_domain_memory_populate_physmap(in
     if ( err == nr_extents )
         return 0;
 
-    if ( err > 0 )
+    if ( err >= 0 )
     {
         DPRINTF("Failed allocation for dom %d: %ld pages order %d\n",
                 domid, nr_extents, extent_order);
diff -r e796d9c2f5e8 -r 5a41ea282c86 tools/libxc/xc_hvm_build.c
--- a/tools/libxc/xc_hvm_build.c        Tue Nov 07 11:19:26 2006 +0000
+++ b/tools/libxc/xc_hvm_build.c        Tue Nov 07 11:54:52 2006 +0000
@@ -219,15 +219,6 @@ static int setup_guest(int xc_handle,
     if ( rc != 0 )
     {
         PERROR("Could not allocate memory for HVM guest.\n");
-        goto error_out;
-    }
-
-    if ( (nr_pages > 0xa0) &&
-         xc_domain_memory_decrease_reservation(
-             xc_handle, dom, (nr_pages < 0xc0) ? (nr_pages - 0xa0) : 0x20,
-             0, &page_array[0xa0]) )
-    {
-        PERROR("Could not free VGA hole.\n");
         goto error_out;
     }
 

_______________________________________________
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] [LIBXC] Fix memory alloc/dealloc routines to return error properly., Xen patchbot-unstable <=