]> git.proxmox.com Git - mirror_qemu.git/blame - include/hw/xen/xen.h
Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into...
[mirror_qemu.git] / include / hw / xen / xen.h
CommitLineData
e37630ca
AL
1/*
2 * public xen header
3 * stuff needed outside xen-*.c, i.e. interfaces to qemu.
4 * must not depend on any xen headers being present in
5 * /usr/include/xen, so it can be included unconditionally.
6 */
50c88402
JM
7#ifndef QEMU_HW_XEN_H
8#define QEMU_HW_XEN_H
9
10/*
e2abfe5e
DW
11 * C files using Xen toolstack libraries will have included those headers
12 * already via xen_native.h, and having __XEM_TOOLS__ defined will have
13 * automatically set __XEN_INTERFACE_VERSION__ to the latest supported
14 * by the *system* Xen headers which were transitively included.
15 *
16 * C files which are part of the internal emulation, and which did not
17 * include xen_native.h, may need this defined so that the Xen headers
18 * imported to include/hw/xen/interface/ will expose the appropriate API
19 * version.
20 *
21 * This is why there's a rule that xen_native.h must be included first.
50c88402 22 */
e2abfe5e
DW
23#ifndef __XEN_INTERFACE_VERSION__
24#define __XEN_INTERFACE_VERSION__ 0x00040e00
25#endif
e37630ca 26
33c11879 27#include "exec/cpu-common.h"
41445300 28
e37630ca
AL
29/* xen-machine.c */
30enum xen_mode {
faa4e800
DW
31 XEN_DISABLED = 0, /* xen support disabled (default) */
32 XEN_ATTACH, /* attach to xen domain created by libxl */
33 XEN_EMULATE, /* emulate Xen within QEMU */
e37630ca
AL
34};
35
36extern uint32_t xen_domid;
37extern enum xen_mode xen_mode;
1c599472 38extern bool xen_domid_restrict;
e37630ca 39
41445300 40int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num);
21d87050 41int xen_set_pci_link_route(uint8_t link, uint8_t irq);
41445300 42void xen_piix3_set_irq(void *opaque, int irq_num, int level);
f1dbf015 43void xen_hvm_inject_msi(uint64_t addr, uint32_t data);
428c3ece 44int xen_is_pirq_msi(uint32_t msi_data);
41445300 45
9c11a8ac
AP
46qemu_irq *xen_interrupt_controller_init(void);
47
c65adf9b
AK
48void xen_register_framebuffer(struct MemoryRegion *mr);
49
e37630ca 50#endif /* QEMU_HW_XEN_H */