direct-io.hg

view tools/libxc/xenguest.h @ 12988:e080700efa56

[TOOLS] Fix the build. Clearly demarcate PPC-specific stuff.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Dec 13 10:23:53 2006 +0000 (2006-12-13)
parents a510c94ceaa3
children 1e590ddb1277 7bf078335342
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 io_fd, uint32_t dom, uint32_t max_iters,
25 uint32_t max_factor, uint32_t flags /* XCFLAGS_xxx */,
26 int (*suspend)(int domid));
29 /**
30 * This function will restore a saved domain running Linux.
31 *
32 * @parm xc_handle a handle to an open hypervisor interface
33 * @parm fd the file descriptor to restore a domain from
34 * @parm dom the id of the domain
35 * @parm nr_pfns the number of pages
36 * @parm store_evtchn the store event channel for this domain to use
37 * @parm store_mfn returned with the mfn of the store page
38 * @return 0 on success, -1 on failure
39 */
40 int xc_linux_restore(int xc_handle, int io_fd, uint32_t dom,
41 unsigned long nr_pfns, unsigned int store_evtchn,
42 unsigned long *store_mfn, unsigned int console_evtchn,
43 unsigned long *console_mfn);
45 /**
46 * This function will create a domain for a paravirtualized Linux
47 * using file names pointing to kernel and ramdisk
48 *
49 * @parm xc_handle a handle to an open hypervisor interface
50 * @parm domid the id of the domain
51 * @parm mem_mb memory size in megabytes
52 * @parm image_name name of the kernel image file
53 * @parm ramdisk_name name of the ramdisk image file
54 * @parm cmdline command line string
55 * @parm flags domain creation flags
56 * @parm store_evtchn the store event channel for this domain to use
57 * @parm store_mfn returned with the mfn of the store page
58 * @parm console_evtchn the console event channel for this domain to use
59 * @parm conole_mfn returned with the mfn of the console page
60 * @return 0 on success, -1 on failure
61 */
62 int xc_linux_build(int xc_handle,
63 uint32_t domid,
64 unsigned int mem_mb,
65 const char *image_name,
66 const char *ramdisk_name,
67 const char *cmdline,
68 const char *features,
69 unsigned long flags,
70 unsigned int store_evtchn,
71 unsigned long *store_mfn,
72 unsigned int console_evtchn,
73 unsigned long *console_mfn);
75 /**
76 * This function will create a domain for a paravirtualized Linux
77 * using buffers for kernel and initrd
78 *
79 * @parm xc_handle a handle to an open hypervisor interface
80 * @parm domid the id of the domain
81 * @parm mem_mb memory size in megabytes
82 * @parm image_buffer buffer containing kernel image
83 * @parm image_size size of the kernel image buffer
84 * @parm initrd_buffer name of the ramdisk image file
85 * @parm initrd_size size of the ramdisk buffer
86 * @parm cmdline command line string
87 * @parm flags domain creation flags
88 * @parm store_evtchn the store event channel for this domain to use
89 * @parm store_mfn returned with the mfn of the store page
90 * @parm console_evtchn the console event channel for this domain to use
91 * @parm conole_mfn returned with the mfn of the console page
92 * @return 0 on success, -1 on failure
93 */
94 int xc_linux_build_mem(int xc_handle,
95 uint32_t domid,
96 unsigned int mem_mb,
97 const char *image_buffer,
98 unsigned long image_size,
99 const char *initrd_buffer,
100 unsigned long initrd_size,
101 const char *cmdline,
102 const char *features,
103 unsigned long flags,
104 unsigned int store_evtchn,
105 unsigned long *store_mfn,
106 unsigned int console_evtchn,
107 unsigned long *console_mfn);
109 int xc_hvm_build(int xc_handle,
110 uint32_t domid,
111 int memsize,
112 const char *image_name);
114 int xc_hvm_build_mem(int xc_handle,
115 uint32_t domid,
116 int memsize,
117 const char *image_buffer,
118 unsigned long image_size);
120 int xc_set_hvm_param(
121 int handle, domid_t dom, int param, unsigned long value);
122 int xc_get_hvm_param(
123 int handle, domid_t dom, int param, unsigned long *value);
125 /* PowerPC specific. */
126 int xc_prose_build(int xc_handle,
127 uint32_t domid,
128 unsigned int mem_mb,
129 const char *image_name,
130 const char *ramdisk_name,
131 const char *cmdline,
132 const char *features,
133 unsigned long flags,
134 unsigned int store_evtchn,
135 unsigned long *store_mfn,
136 unsigned int console_evtchn,
137 unsigned long *console_mfn,
138 void *arch_args);
140 #endif /* XENGUEST_H */