From 4c9f8d1b4eb0e1a7e69df6373e9c2d40a929494d Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Tue, 17 Apr 2012 16:56:51 +0000 Subject: xen: add a dummy xc_hvm_inject_msi for Xen < 4.2 xc_hvm_inject_msi is only available on Xen >= 4.2: add a dummy compatibility function for Xen < 4.2. Also enable msi support only on Xen >= 4.2. Signed-off-by: Stefano Stabellini Acked-by: Anthony PERARD --- hw/xen.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'hw/xen.h') diff --git a/hw/xen.h b/hw/xen.h index e5926b7..3ae4cd0 100644 --- a/hw/xen.h +++ b/hw/xen.h @@ -57,4 +57,14 @@ void xen_register_framebuffer(struct MemoryRegion *mr); # define HVM_MAX_VCPUS 32 #endif +static inline int xen_msi_support(void) +{ +#if defined(CONFIG_XEN_CTRL_INTERFACE_VERSION) \ + && CONFIG_XEN_CTRL_INTERFACE_VERSION >= 420 + return xen_enabled(); +#else + return 0; +#endif +} + #endif /* QEMU_HW_XEN_H */ -- cgit v1.1