aboutsummaryrefslogtreecommitdiff
path: root/hw/xen_common.h
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-04-17 16:56:51 +0000
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-04-17 18:04:42 +0000
commit4c9f8d1b4eb0e1a7e69df6373e9c2d40a929494d (patch)
treec78b0b193fafc9d37c7765350a9aabea084602be /hw/xen_common.h
parent8688e0652dc4fde816316fbd10869e3e33411968 (diff)
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 <stefano.stabellini@eu.citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Diffstat (limited to 'hw/xen_common.h')
-rw-r--r--hw/xen_common.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/xen_common.h b/hw/xen_common.h
index 0409ac7971..7043c14cae 100644
--- a/hw/xen_common.h
+++ b/hw/xen_common.h
@@ -133,6 +133,21 @@ static inline int xc_fd(xc_interface *xen_xc)
}
#endif
+/* Xen before 4.2 */
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
+static inline int xen_xc_hvm_inject_msi(XenXC xen_xc, domid_t dom,
+ uint64_t addr, uint32_t data)
+{
+ return -ENOSYS;
+}
+#else
+static inline int xen_xc_hvm_inject_msi(XenXC xen_xc, domid_t dom,
+ uint64_t addr, uint32_t data)
+{
+ return xc_hvm_inject_msi(xen_xc, dom, addr, data);
+}
+#endif
+
void destroy_hvm_domain(void);
#endif /* QEMU_HW_XEN_COMMON_H */