direct-io.hg

view tools/libxc/xenguest.h @ 12948:f2aaf35c7759

[TOOLS][POWERPC] Add Prose Domain Builder
The following patch addes a Prose domain builder. For the moment it
is a clone of the linux ppc64 builder but will diverge quickly.
Signed-off-by: Jonathan Appavoo <jappavoo@us.ibm.com>
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Wed Oct 18 06:43:33 2006 -0400 (2006-10-18)
parents 9d6bc06919e0
children a510c94ceaa3
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 int xc_prose_build(int xc_handle,
126 uint32_t domid,
127 const char *image_name,
128 const char *ramdisk_name,
129 const char *cmdline,
130 const char *features,
131 unsigned long flags,
132 unsigned int store_evtchn,
133 unsigned long *store_mfn,
134 unsigned int console_evtchn,
135 unsigned long *console_mfn,
136 void *arch_args);
138 #endif /* XENGUEST_H */