From 4a13cf1b7005cc5022b67f2e96ab597108333704 Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Thu, 18 Jan 2007 16:48:03 +0000 Subject: [HVM] save restore: frame work Signed-off-by: Zhai Edwin frame work for HVM save restore in Control Panel --- tools/libxc/xenguest.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tools/libxc/xenguest.h') diff --git a/tools/libxc/xenguest.h b/tools/libxc/xenguest.h index 6d4576026d..7b5a2af0a4 100644 --- a/tools/libxc/xenguest.h +++ b/tools/libxc/xenguest.h @@ -11,6 +11,7 @@ #define XCFLAGS_LIVE 1 #define XCFLAGS_DEBUG 2 +#define XCFLAGS_HVM 4 /** @@ -25,6 +26,13 @@ int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, uint32_t max_factor, uint32_t flags /* XCFLAGS_xxx */, int (*suspend)(int domid)); +/** + * This function will save a hvm domain running unmodified guest. + * @return 0 on success, -1 on failure + */ +int xc_hvm_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, + uint32_t max_factor, uint32_t flags /* XCFLAGS_xxx */, + int (*suspend)(int domid)); /** * This function will restore a saved domain running Linux. @@ -42,6 +50,18 @@ int xc_linux_restore(int xc_handle, int io_fd, uint32_t dom, unsigned long *store_mfn, unsigned int console_evtchn, unsigned long *console_mfn); +/** + * This function will restore a saved hvm domain running unmodified guest. + * + * @parm store_mfn pass mem size & returned with the mfn of the store page + * @return 0 on success, -1 on failure + */ +int xc_hvm_restore(int xc_handle, int io_fd, uint32_t dom, + unsigned long nr_pfns, unsigned int store_evtchn, + unsigned long *store_mfn, unsigned int console_evtchn, + unsigned long *console_mfn, + unsigned int pae, unsigned int apic); + /** * This function will create a domain for a paravirtualized Linux * using file names pointing to kernel and ramdisk -- cgit v1.2.3