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 */ 7 #ifndef QEMU_HW_XEN_H 8 #define QEMU_HW_XEN_H 9 10 /* 11 * As a temporary measure while the headers are being untangled, define 12 * __XEN_TOOLS__ here before any Xen headers are included. Otherwise, if 13 * the Xen toolstack library headers are later included, they will find 14 * some of the "internal" definitions missing and the build will fail. In 15 * later commits, we'll end up with a rule that the native libraries have 16 * to be included first, which will ensure that the libraries get the 17 * version of Xen libraries that they expect. 18 */ 19 #define __XEN_TOOLS__ 1 20 21 #include "exec/cpu-common.h" 22 23 /* xen-machine.c */ 24 enum xen_mode { 25 XEN_DISABLED = 0, /* xen support disabled (default) */ 26 XEN_ATTACH, /* attach to xen domain created by libxl */ 27 XEN_EMULATE, /* emulate Xen within QEMU */ 28 }; 29 30 extern uint32_t xen_domid; 31 extern enum xen_mode xen_mode; 32 extern bool xen_domid_restrict; 33 34 int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num); 35 int xen_set_pci_link_route(uint8_t link, uint8_t irq); 36 void xen_piix3_set_irq(void *opaque, int irq_num, int level); 37 void xen_hvm_inject_msi(uint64_t addr, uint32_t data); 38 int xen_is_pirq_msi(uint32_t msi_data); 39 40 qemu_irq *xen_interrupt_controller_init(void); 41 42 void xenstore_store_pv_console_info(int i, Chardev *chr); 43 44 void xen_register_framebuffer(struct MemoryRegion *mr); 45 46 #endif /* QEMU_HW_XEN_H */ 47