|
Daniel P. Berrange |
1e96c6 |
From 490e4b67768f167736c0a1084a5d6917431c783e Mon Sep 17 00:00:00 2001
|
|
Daniel P. Berrange |
1e96c6 |
From: Juergen Gross <jgross@suse.com>
|
|
Daniel P. Berrange |
1e96c6 |
Date: Thu, 16 Mar 2017 15:19:52 +0100
|
|
Daniel P. Berrange |
1e96c6 |
Subject: [PATCH 6/6] xen: use 5 digit xen versions
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
Today qemu is using e.g. the value 480 for Xen version 4.8.0. As some
|
|
Daniel P. Berrange |
1e96c6 |
Xen version tests are using ">" relations this scheme will lead to
|
|
Daniel P. Berrange |
1e96c6 |
problems when Xen version 4.10.0 is being reached.
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
Instead of the 3 digit schem use a 5 digit scheme (e.g. 40800 for
|
|
Daniel P. Berrange |
1e96c6 |
version 4.8.0).
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
Signed-off-by: Juergen Gross <jgross@suse.com>
|
|
Daniel P. Berrange |
1e96c6 |
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
|
|
Daniel P. Berrange |
1e96c6 |
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
|
|
Daniel P. Berrange |
1e96c6 |
(cherry picked from commit f1167ee684279bffabe7bb3ab23eff87577fe427)
|
|
Daniel P. Berrange |
1e96c6 |
---
|
|
Daniel P. Berrange |
1e96c6 |
configure | 16 ++++++++--------
|
|
Daniel P. Berrange |
1e96c6 |
hw/block/xen_disk.c | 2 +-
|
|
Daniel P. Berrange |
1e96c6 |
include/hw/xen/xen_common.h | 22 +++++++++++-----------
|
|
Daniel P. Berrange |
1e96c6 |
3 files changed, 20 insertions(+), 20 deletions(-)
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
diff --git a/configure b/configure
|
|
Daniel P. Berrange |
1e96c6 |
index 092cb7359d..d5ee30aad8 100755
|
|
Daniel P. Berrange |
1e96c6 |
--- a/configure
|
|
Daniel P. Berrange |
1e96c6 |
+++ b/configure
|
|
Daniel P. Berrange |
1e96c6 |
@@ -2027,7 +2027,7 @@ EOF
|
|
Daniel P. Berrange |
1e96c6 |
compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
|
|
Daniel P. Berrange |
1e96c6 |
then
|
|
Daniel P. Berrange |
1e96c6 |
xen_stable_libs="-lxendevicemodel $xen_stable_libs"
|
|
Daniel P. Berrange |
1e96c6 |
- xen_ctrl_version=490
|
|
Daniel P. Berrange |
1e96c6 |
+ xen_ctrl_version=40900
|
|
Daniel P. Berrange |
1e96c6 |
xen=yes
|
|
Daniel P. Berrange |
1e96c6 |
elif
|
|
Daniel P. Berrange |
1e96c6 |
cat > $TMPC <
|
|
Daniel P. Berrange |
1e96c6 |
@@ -2082,7 +2082,7 @@ int main(void) {
|
|
Daniel P. Berrange |
1e96c6 |
EOF
|
|
Daniel P. Berrange |
1e96c6 |
compile_prog "" "$xen_libs $xen_stable_libs"
|
|
Daniel P. Berrange |
1e96c6 |
then
|
|
Daniel P. Berrange |
1e96c6 |
- xen_ctrl_version=480
|
|
Daniel P. Berrange |
1e96c6 |
+ xen_ctrl_version=40800
|
|
Daniel P. Berrange |
1e96c6 |
xen=yes
|
|
Daniel P. Berrange |
1e96c6 |
elif
|
|
Daniel P. Berrange |
1e96c6 |
cat > $TMPC <
|
|
Daniel P. Berrange |
1e96c6 |
@@ -2133,7 +2133,7 @@ int main(void) {
|
|
Daniel P. Berrange |
1e96c6 |
EOF
|
|
Daniel P. Berrange |
1e96c6 |
compile_prog "" "$xen_libs $xen_stable_libs"
|
|
Daniel P. Berrange |
1e96c6 |
then
|
|
Daniel P. Berrange |
1e96c6 |
- xen_ctrl_version=471
|
|
Daniel P. Berrange |
1e96c6 |
+ xen_ctrl_version=40701
|
|
Daniel P. Berrange |
1e96c6 |
xen=yes
|
|
Daniel P. Berrange |
1e96c6 |
elif
|
|
Daniel P. Berrange |
1e96c6 |
cat > $TMPC <
|
|
Daniel P. Berrange |
1e96c6 |
@@ -2148,7 +2148,7 @@ int main(void) {
|
|
Daniel P. Berrange |
1e96c6 |
EOF
|
|
Daniel P. Berrange |
1e96c6 |
compile_prog "" "$xen_libs"
|
|
Daniel P. Berrange |
1e96c6 |
then
|
|
Daniel P. Berrange |
1e96c6 |
- xen_ctrl_version=470
|
|
Daniel P. Berrange |
1e96c6 |
+ xen_ctrl_version=40700
|
|
Daniel P. Berrange |
1e96c6 |
xen=yes
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
# Xen 4.6
|
|
Daniel P. Berrange |
1e96c6 |
@@ -2176,7 +2176,7 @@ int main(void) {
|
|
Daniel P. Berrange |
1e96c6 |
EOF
|
|
Daniel P. Berrange |
1e96c6 |
compile_prog "" "$xen_libs"
|
|
Daniel P. Berrange |
1e96c6 |
then
|
|
Daniel P. Berrange |
1e96c6 |
- xen_ctrl_version=460
|
|
Daniel P. Berrange |
1e96c6 |
+ xen_ctrl_version=40600
|
|
Daniel P. Berrange |
1e96c6 |
xen=yes
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
# Xen 4.5
|
|
Daniel P. Berrange |
1e96c6 |
@@ -2203,7 +2203,7 @@ int main(void) {
|
|
Daniel P. Berrange |
1e96c6 |
EOF
|
|
Daniel P. Berrange |
1e96c6 |
compile_prog "" "$xen_libs"
|
|
Daniel P. Berrange |
1e96c6 |
then
|
|
Daniel P. Berrange |
1e96c6 |
- xen_ctrl_version=450
|
|
Daniel P. Berrange |
1e96c6 |
+ xen_ctrl_version=40500
|
|
Daniel P. Berrange |
1e96c6 |
xen=yes
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
elif
|
|
Daniel P. Berrange |
1e96c6 |
@@ -2228,7 +2228,7 @@ int main(void) {
|
|
Daniel P. Berrange |
1e96c6 |
EOF
|
|
Daniel P. Berrange |
1e96c6 |
compile_prog "" "$xen_libs"
|
|
Daniel P. Berrange |
1e96c6 |
then
|
|
Daniel P. Berrange |
1e96c6 |
- xen_ctrl_version=420
|
|
Daniel P. Berrange |
1e96c6 |
+ xen_ctrl_version=40200
|
|
Daniel P. Berrange |
1e96c6 |
xen=yes
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
else
|
|
Daniel P. Berrange |
1e96c6 |
@@ -2240,7 +2240,7 @@ EOF
|
|
Daniel P. Berrange |
1e96c6 |
fi
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
if test "$xen" = yes; then
|
|
Daniel P. Berrange |
1e96c6 |
- if test $xen_ctrl_version -ge 471 ; then
|
|
Daniel P. Berrange |
1e96c6 |
+ if test $xen_ctrl_version -ge 40701 ; then
|
|
Daniel P. Berrange |
1e96c6 |
libs_softmmu="$xen_stable_libs $libs_softmmu"
|
|
Daniel P. Berrange |
1e96c6 |
fi
|
|
Daniel P. Berrange |
1e96c6 |
libs_softmmu="$xen_libs $libs_softmmu"
|
|
Daniel P. Berrange |
1e96c6 |
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
|
|
Daniel P. Berrange |
1e96c6 |
index 456a2d5694..27df0486d9 100644
|
|
Daniel P. Berrange |
1e96c6 |
--- a/hw/block/xen_disk.c
|
|
Daniel P. Berrange |
1e96c6 |
+++ b/hw/block/xen_disk.c
|
|
Daniel P. Berrange |
1e96c6 |
@@ -492,7 +492,7 @@ static int ioreq_map(struct ioreq *ioreq)
|
|
Daniel P. Berrange |
1e96c6 |
return 0;
|
|
Daniel P. Berrange |
1e96c6 |
}
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION >= 480
|
|
Daniel P. Berrange |
1e96c6 |
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40800
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
static void ioreq_free_copy_buffers(struct ioreq *ioreq)
|
|
Daniel P. Berrange |
1e96c6 |
{
|
|
Daniel P. Berrange |
1e96c6 |
diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
|
|
Daniel P. Berrange |
1e96c6 |
index b1f5f53e35..fa990a07c0 100644
|
|
Daniel P. Berrange |
1e96c6 |
--- a/include/hw/xen/xen_common.h
|
|
Daniel P. Berrange |
1e96c6 |
+++ b/include/hw/xen/xen_common.h
|
|
Daniel P. Berrange |
1e96c6 |
@@ -26,7 +26,7 @@ extern xc_interface *xen_xc;
|
|
Daniel P. Berrange |
1e96c6 |
* We don't support Xen prior to 4.2.0.
|
|
Daniel P. Berrange |
1e96c6 |
*/
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 490
|
|
Daniel P. Berrange |
1e96c6 |
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40900
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
typedef xc_interface xendevicemodel_handle;
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
@@ -36,7 +36,7 @@ static inline xendevicemodel_handle *xendevicemodel_open(
|
|
Daniel P. Berrange |
1e96c6 |
return xen_xc;
|
|
Daniel P. Berrange |
1e96c6 |
}
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION >= 450
|
|
Daniel P. Berrange |
1e96c6 |
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40500
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
static inline int xendevicemodel_create_ioreq_server(
|
|
Daniel P. Berrange |
1e96c6 |
xendevicemodel_handle *dmod, domid_t domid, int handle_bufioreq,
|
|
Daniel P. Berrange |
1e96c6 |
@@ -99,7 +99,7 @@ static inline int xendevicemodel_set_ioreq_server_state(
|
|
Daniel P. Berrange |
1e96c6 |
return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
|
|
Daniel P. Berrange |
1e96c6 |
}
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
-#endif /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 450 */
|
|
Daniel P. Berrange |
1e96c6 |
+#endif /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40500 */
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
static inline int xendevicemodel_set_pci_intx_level(
|
|
Daniel P. Berrange |
1e96c6 |
xendevicemodel_handle *dmod, domid_t domid, uint16_t segment,
|
|
Daniel P. Berrange |
1e96c6 |
@@ -151,7 +151,7 @@ static inline int xendevicemodel_set_mem_type(
|
|
Daniel P. Berrange |
1e96c6 |
return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
|
|
Daniel P. Berrange |
1e96c6 |
}
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
-#else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 490 */
|
|
Daniel P. Berrange |
1e96c6 |
+#else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40900 */
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
#undef XC_WANT_COMPAT_DEVICEMODEL_API
|
|
Daniel P. Berrange |
1e96c6 |
#include <xendevicemodel.h>
|
|
Daniel P. Berrange |
1e96c6 |
@@ -207,7 +207,7 @@ static inline int xen_modified_memory(domid_t domid, uint64_t first_pfn,
|
|
Daniel P. Berrange |
1e96c6 |
}
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
/* Xen 4.2 through 4.6 */
|
|
Daniel P. Berrange |
1e96c6 |
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 471
|
|
Daniel P. Berrange |
1e96c6 |
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40701
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
typedef xc_interface xenforeignmemory_handle;
|
|
Daniel P. Berrange |
1e96c6 |
typedef xc_evtchn xenevtchn_handle;
|
|
Daniel P. Berrange |
1e96c6 |
@@ -248,7 +248,7 @@ static inline void *xenforeignmemory_map(xc_interface *h, uint32_t dom,
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
#define xenforeignmemory_unmap(h, p, s) munmap(p, s * XC_PAGE_SIZE)
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
-#else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 471 */
|
|
Daniel P. Berrange |
1e96c6 |
+#else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40701 */
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
#include <xenevtchn.h>
|
|
Daniel P. Berrange |
1e96c6 |
#include <xengnttab.h>
|
|
Daniel P. Berrange |
1e96c6 |
@@ -284,7 +284,7 @@ static inline int xen_get_vmport_regs_pfn(xc_interface *xc, domid_t dom,
|
|
Daniel P. Berrange |
1e96c6 |
#endif
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
/* Xen before 4.6 */
|
|
Daniel P. Berrange |
1e96c6 |
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 460
|
|
Daniel P. Berrange |
1e96c6 |
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40600
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
#ifndef HVM_IOREQSRV_BUFIOREQ_ATOMIC
|
|
Daniel P. Berrange |
1e96c6 |
#define HVM_IOREQSRV_BUFIOREQ_ATOMIC 2
|
|
Daniel P. Berrange |
1e96c6 |
@@ -330,7 +330,7 @@ static inline int xen_get_default_ioreq_server_info(domid_t dom,
|
|
Daniel P. Berrange |
1e96c6 |
}
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
/* Xen before 4.5 */
|
|
Daniel P. Berrange |
1e96c6 |
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 450
|
|
Daniel P. Berrange |
1e96c6 |
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40500
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
#ifndef HVM_PARAM_BUFIOREQ_EVTCHN
|
|
Daniel P. Berrange |
1e96c6 |
#define HVM_PARAM_BUFIOREQ_EVTCHN 26
|
|
Daniel P. Berrange |
1e96c6 |
@@ -569,7 +569,7 @@ static inline int xen_set_ioreq_server_state(domid_t dom,
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
#endif
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 460
|
|
Daniel P. Berrange |
1e96c6 |
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40600
|
|
Daniel P. Berrange |
1e96c6 |
static inline int xen_xc_domain_add_to_physmap(xc_interface *xch, uint32_t domid,
|
|
Daniel P. Berrange |
1e96c6 |
unsigned int space,
|
|
Daniel P. Berrange |
1e96c6 |
unsigned long idx,
|
|
Daniel P. Berrange |
1e96c6 |
@@ -592,7 +592,7 @@ static inline int xen_xc_domain_add_to_physmap(xc_interface *xch, uint32_t domid
|
|
Daniel P. Berrange |
1e96c6 |
#endif
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
#ifdef CONFIG_XEN_PV_DOMAIN_BUILD
|
|
Daniel P. Berrange |
1e96c6 |
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 470
|
|
Daniel P. Berrange |
1e96c6 |
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40700
|
|
Daniel P. Berrange |
1e96c6 |
static inline int xen_domain_create(xc_interface *xc, uint32_t ssidref,
|
|
Daniel P. Berrange |
1e96c6 |
xen_domain_handle_t handle, uint32_t flags,
|
|
Daniel P. Berrange |
1e96c6 |
uint32_t *pdomid)
|
|
Daniel P. Berrange |
1e96c6 |
@@ -611,7 +611,7 @@ static inline int xen_domain_create(xc_interface *xc, uint32_t ssidref,
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
/* Xen before 4.8 */
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 480
|
|
Daniel P. Berrange |
1e96c6 |
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40800
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
|
|
Daniel P. Berrange |
1e96c6 |
typedef void *xengnttab_grant_copy_segment_t;
|
|
Daniel P. Berrange |
1e96c6 |
--
|
|
Daniel P. Berrange |
1e96c6 |
2.13.0
|
|
Daniel P. Berrange |
1e96c6 |
|