master
h 36 lines 954 Bytes
Raw
1 /*
2 * QEMU Xen support
3 *
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 */
7
8 /* header to be included in non-Xen-specific code */
9
10 #ifndef SYSTEM_XEN_H
11 #define SYSTEM_XEN_H
12
13 #include "exec/hwaddr.h"
14 #include "system/ram_addr.h"
15
16 #ifdef COMPILING_PER_TARGET
17 # ifdef CONFIG_XEN
18 # define CONFIG_XEN_IS_POSSIBLE
19 # endif
20 #else
21 # define CONFIG_XEN_IS_POSSIBLE
22 #endif /* COMPILING_PER_TARGET */
23
24 #ifdef CONFIG_XEN_IS_POSSIBLE
25 extern bool xen_allowed;
26 #define xen_enabled() (xen_allowed)
27 #else /* !CONFIG_XEN_IS_POSSIBLE */
28 #define xen_enabled() 0
29 #endif /* CONFIG_XEN_IS_POSSIBLE */
30
31 void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length);
32 void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
33 const MemoryRegion *mr, Error **errp);
34 bool xen_mr_is_memory(const MemoryRegion *mr);
35 bool xen_mr_is_grants(const MemoryRegion *mr);
36 #endif