target/cris: Let cris_mmu_translate() use MMUAccessType access_type
[qemu/ar7.git] / include / sysemu / xen.h
blob0ca25697e4f4f69c8a768c0343bad9a4800e63b0
1 /*
2 * QEMU Xen support
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 */
8 #ifndef SYSEMU_XEN_H
9 #define SYSEMU_XEN_H
11 #include "exec/cpu-common.h"
13 #ifdef NEED_CPU_H
14 # ifdef CONFIG_XEN
15 # define CONFIG_XEN_IS_POSSIBLE
16 # endif
17 #else
18 # define CONFIG_XEN_IS_POSSIBLE
19 #endif
21 #ifdef CONFIG_XEN_IS_POSSIBLE
23 extern bool xen_allowed;
25 #define xen_enabled() (xen_allowed)
27 #ifndef CONFIG_USER_ONLY
28 void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length);
29 void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
30 struct MemoryRegion *mr, Error **errp);
31 #endif
33 #else /* !CONFIG_XEN_IS_POSSIBLE */
35 #define xen_enabled() 0
36 #ifndef CONFIG_USER_ONLY
37 static inline void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length)
39 /* nothing */
41 static inline void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
42 MemoryRegion *mr, Error **errp)
44 g_assert_not_reached();
46 #endif
48 #endif /* CONFIG_XEN_IS_POSSIBLE */
50 #endif