]> git.proxmox.com Git - mirror_qemu.git/blame - include/sysemu/xen.h
dump: Introduce shdr_num to decrease complexity
[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
8#ifndef SYSEMU_XEN_H
9#define SYSEMU_XEN_H
10
ce6936bc
PMD
11#include "exec/cpu-common.h"
12
8e0ef068
PMD
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
20
21#ifdef CONFIG_XEN_IS_POSSIBLE
22
23extern bool xen_allowed;
da278d58 24
8e0ef068 25#define xen_enabled() (xen_allowed)
da278d58
PMD
26
27#ifndef CONFIG_USER_ONLY
28void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length);
29void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
30 struct MemoryRegion *mr, Error **errp);
31#endif
32
8e0ef068 33#else /* !CONFIG_XEN_IS_POSSIBLE */
da278d58
PMD
34
35#define xen_enabled() 0
36#ifndef CONFIG_USER_ONLY
37static inline void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length)
38{
39 /* nothing */
40}
41static inline void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
42 MemoryRegion *mr, Error **errp)
43{
44 g_assert_not_reached();
45}
46#endif
47
8e0ef068 48#endif /* CONFIG_XEN_IS_POSSIBLE */
da278d58
PMD
49
50#endif