xen: Add xenfv machine
[qemu.git] / hw / xen.h
1 #ifndef QEMU_HW_XEN_H
2 #define QEMU_HW_XEN_H 1
3 /*
4 * public xen header
5 * stuff needed outside xen-*.c, i.e. interfaces to qemu.
6 * must not depend on any xen headers being present in
7 * /usr/include/xen, so it can be included unconditionally.
8 */
9 #include <inttypes.h>
10
11 /* xen-machine.c */
12 enum xen_mode {
13 XEN_EMULATE = 0, // xen emulation, using xenner (default)
14 XEN_CREATE, // create xen domain
15 XEN_ATTACH // attach to xen domain created by xend
16 };
17
18 extern uint32_t xen_domid;
19 extern enum xen_mode xen_mode;
20
21 extern int xen_allowed;
22
23 static inline int xen_enabled(void)
24 {
25 #ifdef CONFIG_XEN
26 return xen_allowed;
27 #else
28 return 0;
29 #endif
30 }
31
32 int xen_init(void);
33 int xen_hvm_init(void);
34 void xen_vcpu_init(void);
35
36 #if defined(CONFIG_XEN) && CONFIG_XEN_CTRL_INTERFACE_VERSION < 400
37 # define HVM_MAX_VCPUS 32
38 #endif
39
40 #endif /* QEMU_HW_XEN_H */