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 11 #ifdef CONFIG_XEN 12 13 bool xen_enabled(void); 14 15 #ifndef CONFIG_USER_ONLY 16 void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length); 17 void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, 18 struct MemoryRegion *mr, Error **errp); 19 #endif 20 21 #else /* !CONFIG_XEN */ 22 23 #define xen_enabled() 0 24 #ifndef CONFIG_USER_ONLY 25 static inline void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length) 26 { 27 /* nothing */ 28 } 29 static inline void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, 30 MemoryRegion *mr, Error **errp) 31 { 32 g_assert_not_reached(); 33 } 34 #endif 35 36 #endif /* CONFIG_XEN */ 37 38 #endif 39