From 8f76fc6c983e3bf7c8c32fae2c7264f718e2b467 Mon Sep 17 00:00:00 2001 From: Paul Durrant Date: Fri, 16 Dec 2011 14:54:14 +0000 Subject: tools: VM generation ID save/restore and migrate. Add code to track the address of the VM generation ID buffer across a save/restore or migrate, and increment it as necessary. The address of the buffer is written into xenstore by hvmloader at boot time. It must be read from xenstore by the caller of xc_domain_save() and then written back again by the caller of xc_domain_restore(). Note that the changes to xc_save.c and xc_restore.c are merely sufficient for them to build. Signed-off-by: Paul Durrant Committed-by: Ian Jackson --- tools/xcutils/xc_restore.c | 3 ++- tools/xcutils/xc_save.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/xcutils') diff --git a/tools/xcutils/xc_restore.c b/tools/xcutils/xc_restore.c index 985cbecb11..63d53a88b0 100644 --- a/tools/xcutils/xc_restore.c +++ b/tools/xcutils/xc_restore.c @@ -46,7 +46,8 @@ main(int argc, char **argv) superpages = !!hvm; ret = xc_domain_restore(xch, io_fd, domid, store_evtchn, &store_mfn, - console_evtchn, &console_mfn, hvm, pae, superpages); + console_evtchn, &console_mfn, hvm, pae, superpages, + 0, NULL); if ( ret == 0 ) { diff --git a/tools/xcutils/xc_save.c b/tools/xcutils/xc_save.c index debb1bb89e..252759ea95 100644 --- a/tools/xcutils/xc_save.c +++ b/tools/xcutils/xc_save.c @@ -208,7 +208,7 @@ main(int argc, char **argv) callbacks.suspend = suspend; callbacks.switch_qemu_logdirty = switch_qemu_logdirty; ret = xc_domain_save(si.xch, io_fd, si.domid, maxit, max_f, si.flags, - &callbacks, !!(si.flags & XCFLAGS_HVM)); + &callbacks, !!(si.flags & XCFLAGS_HVM), 0); if (si.suspend_evtchn > 0) xc_suspend_evtchn_release(si.xch, si.xce, si.domid, si.suspend_evtchn); -- cgit v1.2.3