From patchwork Fri Apr 21 20:14:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9693661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 45BBC601D4 for ; Fri, 21 Apr 2017 20:19:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 371FC28673 for ; Fri, 21 Apr 2017 20:19:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BF0828677; Fri, 21 Apr 2017 20:19:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9E5E928673 for ; Fri, 21 Apr 2017 20:19:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1exe-0008Su-8J; Fri, 21 Apr 2017 20:15:22 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1exc-0008Rt-Tr for xen-devel@lists.xenproject.org; Fri, 21 Apr 2017 20:15:21 +0000 Received: from [85.158.139.211] by server-9.bemta-5.messagelabs.com id F7/87-01999-8586AF85; Fri, 21 Apr 2017 20:15:20 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeJIrShJLcpLzFFi42I5NlG2Qzc041e EQeMyYYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNeP/zdqCBuOKRbOWsDQwztHsYuTiEBKYyijx csdhNginjUmiedta9i5GTg42AUOJv082sYHYIgIyEp2XFjGCFDEL7GGUuHTrIxNIQljAWKL/w UegBg4OFgFVidPLWEDCvAJuEnu+rAXrlRCQkzh5bDIriM0p4C5xfPIHVohl7YwST240sUIUZU jM65kDZXtJLLpxCcpWk7h6bhPzBEa+BYwMqxjVi1OLylKLdA31kooy0zNKchMzc3QNDUz1clO LixPTU3MSk4r1kvNzNzECw6SegYFxB2NTr/MhRkkOJiVR3pDfPyOE+JLyUyozEosz4otKc1KL DzHKcHAoSfD2pP+KEBIsSk1PrUjLzAEGLExagoNHSYT3Mkiat7ggMbc4Mx0idYpRl+PQ85/vm YRY8vLzUqXEeXeCFAmAFGWU5sGNgEXPJUZZKWFeRgYGBiGegtSi3MwSVPlXjOIcjErCvL0gU3 gy80rgNr0COoIJ6Iizfj9AjihJREhJNTCWzGb8umbdLM77k5lcW3iDXXJN18zyfeti+DaccU+ 6ik9P4+v2mfN5ZAVbL4g+v2ndv3/f1XU5n7RatJLFt2yWu739RSH79v0OfsmGW9WWceyXrFg1 Ven0vPquyO9TJ5y7yhh/98nRG3yVWm/7H1mfnH7ST3cxf8nbM9+8LjrMnvN/d5qkNMtiJZbij ERDLeai4kQAVxkqwpkCAAA= X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-10.tower-206.messagelabs.com!1492805715!73173046!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37989 invoked from network); 21 Apr 2017 20:15:17 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-10.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 21 Apr 2017 20:15:17 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93E072022D; Fri, 21 Apr 2017 20:15:14 +0000 (UTC) Received: from localhost.localdomain (unknown [99.165.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 30FB22024F; Fri, 21 Apr 2017 20:15:13 +0000 (UTC) From: Stefano Stabellini To: peter.maydell@linaro.org Date: Fri, 21 Apr 2017 13:14:47 -0700 Message-Id: <1492805702-19690-6-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1492805702-19690-1-git-send-email-sstabellini@kernel.org> References: <1492805702-19690-1-git-send-email-sstabellini@kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP Cc: Juergen Gross , sstabellini@kernel.org, stefanha@gmail.com, qemu-devel@nongnu.org, stefanha@redhat.com, anthony.perard@citrix.com, xen-devel@lists.xenproject.org Subject: [Xen-devel] [PULL 06/21] xen: use 5 digit xen versions X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Juergen Gross Today qemu is using e.g. the value 480 for Xen version 4.8.0. As some Xen version tests are using ">" relations this scheme will lead to problems when Xen version 4.10.0 is being reached. Instead of the 3 digit schem use a 5 digit scheme (e.g. 40800 for version 4.8.0). Signed-off-by: Juergen Gross Signed-off-by: Stefano Stabellini Reviewed-by: Stefano Stabellini --- configure | 16 ++++++++-------- hw/block/xen_disk.c | 2 +- include/hw/xen/xen_common.h | 22 +++++++++++----------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/configure b/configure index e333547..271bea8 100755 --- a/configure +++ b/configure @@ -2014,7 +2014,7 @@ EOF compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs" then xen_stable_libs="-lxendevicemodel $xen_stable_libs" - xen_ctrl_version=490 + xen_ctrl_version=40900 xen=yes elif cat > $TMPC < $TMPC < $TMPC <= 480 +#if CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40800 static void ioreq_free_copy_buffers(struct ioreq *ioreq) { diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h index b1f5f53..fa990a0 100644 --- a/include/hw/xen/xen_common.h +++ b/include/hw/xen/xen_common.h @@ -26,7 +26,7 @@ extern xc_interface *xen_xc; * We don't support Xen prior to 4.2.0. */ -#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 490 +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40900 typedef xc_interface xendevicemodel_handle; @@ -36,7 +36,7 @@ static inline xendevicemodel_handle *xendevicemodel_open( return xen_xc; } -#if CONFIG_XEN_CTRL_INTERFACE_VERSION >= 450 +#if CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40500 static inline int xendevicemodel_create_ioreq_server( xendevicemodel_handle *dmod, domid_t domid, int handle_bufioreq, @@ -99,7 +99,7 @@ static inline int xendevicemodel_set_ioreq_server_state( return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled); } -#endif /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 450 */ +#endif /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40500 */ static inline int xendevicemodel_set_pci_intx_level( xendevicemodel_handle *dmod, domid_t domid, uint16_t segment, @@ -151,7 +151,7 @@ static inline int xendevicemodel_set_mem_type( return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr); } -#else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 490 */ +#else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40900 */ #undef XC_WANT_COMPAT_DEVICEMODEL_API #include @@ -207,7 +207,7 @@ static inline int xen_modified_memory(domid_t domid, uint64_t first_pfn, } /* Xen 4.2 through 4.6 */ -#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 471 +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40701 typedef xc_interface xenforeignmemory_handle; typedef xc_evtchn xenevtchn_handle; @@ -248,7 +248,7 @@ static inline void *xenforeignmemory_map(xc_interface *h, uint32_t dom, #define xenforeignmemory_unmap(h, p, s) munmap(p, s * XC_PAGE_SIZE) -#else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 471 */ +#else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40701 */ #include #include @@ -284,7 +284,7 @@ static inline int xen_get_vmport_regs_pfn(xc_interface *xc, domid_t dom, #endif /* Xen before 4.6 */ -#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 460 +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40600 #ifndef HVM_IOREQSRV_BUFIOREQ_ATOMIC #define HVM_IOREQSRV_BUFIOREQ_ATOMIC 2 @@ -330,7 +330,7 @@ static inline int xen_get_default_ioreq_server_info(domid_t dom, } /* Xen before 4.5 */ -#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 450 +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40500 #ifndef HVM_PARAM_BUFIOREQ_EVTCHN #define HVM_PARAM_BUFIOREQ_EVTCHN 26 @@ -569,7 +569,7 @@ static inline int xen_set_ioreq_server_state(domid_t dom, #endif -#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 460 +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40600 static inline int xen_xc_domain_add_to_physmap(xc_interface *xch, uint32_t domid, unsigned int space, unsigned long idx, @@ -592,7 +592,7 @@ static inline int xen_xc_domain_add_to_physmap(xc_interface *xch, uint32_t domid #endif #ifdef CONFIG_XEN_PV_DOMAIN_BUILD -#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 470 +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40700 static inline int xen_domain_create(xc_interface *xc, uint32_t ssidref, xen_domain_handle_t handle, uint32_t flags, uint32_t *pdomid) @@ -611,7 +611,7 @@ static inline int xen_domain_create(xc_interface *xc, uint32_t ssidref, /* Xen before 4.8 */ -#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 480 +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40800 typedef void *xengnttab_grant_copy_segment_t;