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

[Xen-changelog] [xen-unstable] hvm: unset_mm_mapping() for vga acceleration region should recalculate



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1172247396 0
# Node ID 91427cadfa48407ef3fe9f1568f6cc73888fcc37
# Parent  2c3a13993b0d1c6b374e96c5a365fe615dca2f72
hvm: unset_mm_mapping() for vga acceleration region should recalculate
maxmem setting before freeing memory!
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/ioemu/vl.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -r 2c3a13993b0d -r 91427cadfa48 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Fri Feb 23 14:44:07 2007 +0000
+++ b/tools/ioemu/vl.c  Fri Feb 23 16:16:36 2007 +0000
@@ -5768,17 +5768,17 @@ int unset_mm_mapping(int xc_handle, uint
     int err = 0;
     xc_dominfo_t info;
 
+    xc_domain_getinfo(xc_handle, domid, 1, &info);
+    if ((info.nr_pages - nr_pages) <= 0) {
+        fprintf(stderr, "unset_mm_mapping: error nr_pages\n");
+        err = -1;
+    }
+
     err = xc_domain_memory_decrease_reservation(xc_handle, domid,
                                                 nr_pages, 0, extent_start);
     if (err)
         fprintf(stderr, "Failed to decrease physmap\n");
 
-    xc_domain_getinfo(xc_handle, domid, 1, &info);
-
-    if ((info.nr_pages - nr_pages) <= 0) {
-        fprintf(stderr, "unset_mm_mapping: error nr_pages\n");
-        err = -1;
-    }
 
     if (xc_domain_setmaxmem(xc_handle, domid, (info.nr_pages - nr_pages) *
                             PAGE_SIZE/1024) != 0) {

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