]> git.proxmox.com Git - mirror_qemu.git/blame - include/sysemu/xen.h
bsd-user: Implement host_to_target_waitstatus conversion.
[mirror_qemu.git] / include / sysemu / xen.h
CommitLineData
da278d58
PMD
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
69700301
PMD
8/* header to be included in non-Xen-specific code */
9
da278d58
PMD
10#ifndef SYSEMU_XEN_H
11#define SYSEMU_XEN_H
12
ce6936bc
PMD
13#include "exec/cpu-common.h"
14
8e0ef068
PMD
15#ifdef NEED_CPU_H
16# ifdef CONFIG_XEN
17# define CONFIG_XEN_IS_POSSIBLE
18# endif
19#else
20# define CONFIG_XEN_IS_POSSIBLE
21#endif
22
23#ifdef CONFIG_XEN_IS_POSSIBLE
24
25extern bool xen_allowed;
da278d58 26
8e0ef068 27#define xen_enabled() (xen_allowed)
da278d58
PMD
28
29#ifndef CONFIG_USER_ONLY
30void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length);
31void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
32 struct MemoryRegion *mr, Error **errp);
33#endif
34
8e0ef068 35#else /* !CONFIG_XEN_IS_POSSIBLE */
da278d58
PMD
36
37#define xen_enabled() 0
38#ifndef CONFIG_USER_ONLY
39static inline void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length)
40{
41 /* nothing */
42}
43static inline void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
44 MemoryRegion *mr, Error **errp)
45{
46 g_assert_not_reached();
47}
48#endif
49
8e0ef068 50#endif /* CONFIG_XEN_IS_POSSIBLE */
da278d58
PMD
51
52#endif