From: Keir Fraser Date: Sat, 5 Apr 2008 21:21:42 +0000 (+0100) Subject: ioemu: drop duplicate memory reservation X-Git-Tag: 3.3.0-rc1~243^2~64 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ded4af08620a06de5f6c964cc441080e28000e40;p=xen.git ioemu: drop duplicate memory reservation Signed-off-by: Samuel Thibault --- diff --git a/tools/ioemu/vl.c b/tools/ioemu/vl.c index 94ebb0e61a..6b708c2d29 100644 --- a/tools/ioemu/vl.c +++ b/tools/ioemu/vl.c @@ -7018,26 +7018,12 @@ int unset_mm_mapping(int xc_handle, uint32_t domid, xen_pfn_t *extent_start) { 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"); - - 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); - err = -1; - } - return err; } @@ -7045,17 +7031,8 @@ int set_mm_mapping(int xc_handle, uint32_t domid, unsigned long nr_pages, unsigned int address_bits, xen_pfn_t *extent_start) { - xc_dominfo_t info; int err = 0; - xc_domain_getinfo(xc_handle, domid, 1, &info); - - if (xc_domain_setmaxmem(xc_handle, domid, info.max_memkb + - nr_pages * PAGE_SIZE/1024) != 0) { - fprintf(logfile, "set maxmem returned error %d\n", errno); - return -1; - } - err = xc_domain_memory_populate_physmap(xc_handle, domid, nr_pages, 0, address_bits, extent_start); if (err) {