aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ioemu/vl.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-02-23 16:16:36 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-02-23 16:16:36 +0000
commit2f40f165d62ff4eeda12575f5c4e13e6770b4b72 (patch)
tree8b1b36c0a89a10ab1c531369da0d58ca4ddf9831 /tools/ioemu/vl.c
parentae83184fe384dcdbc2beda91bf9b5c3062337fb8 (diff)
downloadxen-2f40f165d62ff4eeda12575f5c4e13e6770b4b72.tar.gz
xen-2f40f165d62ff4eeda12575f5c4e13e6770b4b72.tar.bz2
xen-2f40f165d62ff4eeda12575f5c4e13e6770b4b72.zip
hvm: unset_mm_mapping() for vga acceleration region should recalculate
maxmem setting before freeing memory! Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/ioemu/vl.c')
-rw-r--r--tools/ioemu/vl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/ioemu/vl.c b/tools/ioemu/vl.c
index ed29028d41..bf6392058d 100644
--- a/tools/ioemu/vl.c
+++ b/tools/ioemu/vl.c
@@ -5768,18 +5768,18 @@ int unset_mm_mapping(int xc_handle, uint32_t domid,
int err = 0;
xc_dominfo_t info;
- 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;
}
+ err = xc_domain_memory_decrease_reservation(xc_handle, domid,
+ nr_pages, 0, extent_start);
+ if (err)
+ fprintf(stderr, "Failed to decrease physmap\n");
+
+
if (xc_domain_setmaxmem(xc_handle, domid, (info.nr_pages - nr_pages) *
PAGE_SIZE/1024) != 0) {
fprintf(logfile, "set maxmem returned error %d\n", errno);