ia64/xen-unstable

view tools/libxc/xenguest.h @ 6689:7d0fb56b4a91

merge?
author cl349@firebug.cl.cam.ac.uk
date Wed Sep 07 19:01:31 2005 +0000 (2005-09-07)
parents 549f4256ab3c b6c98fe62e1a
children b2f4823b6ff0 b35215021b32 9af349b055e5 3233e7ecfa9f
line source
1 /******************************************************************************
2 * xenguest.h
3 *
4 * A library for guest domain management in Xen.
5 *
6 * Copyright (c) 2003-2004, K A Fraser.
7 */
9 #ifndef XENGUEST_H
10 #define XENGUEST_H
12 #define XCFLAGS_LIVE 1
13 #define XCFLAGS_DEBUG 2
16 /**
17 * This function will save a domain running Linux.
18 *
19 * @parm xc_handle a handle to an open hypervisor interface
20 * @parm fd the file descriptor to save a domain to
21 * @parm dom the id of the domain
22 * @return 0 on success, -1 on failure
23 */
24 int xc_linux_save(int xc_handle, int fd, uint32_t dom, uint32_t max_iters,
25 uint32_t max_factor, uint32_t flags /* XCFLAGS_xxx */);
27 /**
28 * This function will restore a saved domain running Linux.
29 *
30 * @parm xc_handle a handle to an open hypervisor interface
31 * @parm fd the file descriptor to restore a domain from
32 * @parm dom the id of the domain
33 * @parm nr_pfns the number of pages
34 * @parm store_evtchn the store event channel for this domain to use
35 * @parm store_mfn returned with the mfn of the store page
36 * @return 0 on success, -1 on failure
37 */
38 int xc_linux_restore(int xc_handle, int io_fd, uint32_t dom,
39 unsigned long nr_pfns, unsigned int store_evtchn,
40 unsigned long *store_mfn, unsigned int console_evtchn,
41 unsigned long *console_mfn);
43 int xc_linux_build(int xc_handle,
44 uint32_t domid,
45 const char *image_name,
46 const char *ramdisk_name,
47 const char *cmdline,
48 unsigned long flags,
49 unsigned int vcpus,
50 unsigned int store_evtchn,
51 unsigned long *store_mfn,
52 unsigned int console_evtchn,
53 unsigned long *console_mfn);
55 struct mem_map;
56 int xc_vmx_build(int xc_handle,
57 uint32_t domid,
58 int memsize,
59 const char *image_name,
60 struct mem_map *memmap,
61 const char *ramdisk_name,
62 const char *cmdline,
63 unsigned int control_evtchn,
64 unsigned long flags,
65 unsigned int vcpus,
66 unsigned int store_evtchn,
67 unsigned long *store_mfn);
69 #endif // XENGUEST_H