aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xcutils
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@xensource.com>2007-02-09 10:48:41 +0000
committerTim Deegan <Tim.Deegan@xensource.com>2007-02-09 10:48:41 +0000
commite0bc4531dfc430497e311f13192781ce215d40b8 (patch)
tree11fe8e310a71d1b697e7be224d0d68f658a8f6e2 /tools/xcutils
parent982965741d777beb7f79e46e15a05f8c6dd2ce1e (diff)
downloadxen-e0bc4531dfc430497e311f13192781ce215d40b8.tar.gz
xen-e0bc4531dfc430497e311f13192781ce215d40b8.tar.bz2
xen-e0bc4531dfc430497e311f13192781ce215d40b8.zip
[HVM] Save/restore: disentangle max_pfn from nr_pages.
These have been used interchangeably, which is OK for PV domains but not for HVM. This fixes an over-allocation by 256MB when restoring HVM guests that have more than 4GB of RAM. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Diffstat (limited to 'tools/xcutils')
-rw-r--r--tools/xcutils/xc_restore.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/xcutils/xc_restore.c b/tools/xcutils/xc_restore.c
index 6629e33082..0eaf3210a3 100644
--- a/tools/xcutils/xc_restore.c
+++ b/tools/xcutils/xc_restore.c
@@ -18,14 +18,14 @@
int
main(int argc, char **argv)
{
- unsigned int xc_fd, io_fd, domid, nr_pfns, store_evtchn, console_evtchn;
+ unsigned int xc_fd, io_fd, domid, max_pfn, store_evtchn, console_evtchn;
unsigned int hvm, pae, apic;
int ret;
unsigned long store_mfn, console_mfn;
if (argc != 9)
errx(1,
- "usage: %s iofd domid nr_pfns store_evtchn console_evtchn hvm pae apic",
+ "usage: %s iofd domid max_pfn store_evtchn console_evtchn hvm pae apic",
argv[0]);
xc_fd = xc_interface_open();
@@ -34,7 +34,7 @@ main(int argc, char **argv)
io_fd = atoi(argv[1]);
domid = atoi(argv[2]);
- nr_pfns = atoi(argv[3]);
+ max_pfn = atoi(argv[3]);
store_evtchn = atoi(argv[4]);
console_evtchn = atoi(argv[5]);
hvm = atoi(argv[6]);
@@ -44,10 +44,10 @@ main(int argc, char **argv)
if (hvm) {
/* pass the memsize to xc_hvm_restore to find the store_mfn */
store_mfn = hvm;
- ret = xc_hvm_restore(xc_fd, io_fd, domid, nr_pfns, store_evtchn,
+ ret = xc_hvm_restore(xc_fd, io_fd, domid, max_pfn, store_evtchn,
&store_mfn, pae, apic);
} else
- ret = xc_linux_restore(xc_fd, io_fd, domid, nr_pfns, store_evtchn,
+ ret = xc_linux_restore(xc_fd, io_fd, domid, max_pfn, store_evtchn,
&store_mfn, console_evtchn, &console_mfn);
if (ret == 0) {