[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] xen: drop support for Xen 4.1 and older.
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] xen: drop support for Xen 4.1 and older. |
Date: |
Tue, 9 Feb 2016 16:50:45 +0000 |
User-agent: |
Alpine 2.02 (DEB 1266 2009-07-14) |
On Tue, 9 Feb 2016, Ian Campbell wrote:
> Xen 4.2 become unsupported upstream in 09/2105 (see
> http://wiki.xen.org/wiki/Xen_Release_Features). However as far as the
> interfaces provided by the toolstack libraries go 4.2 and 4.3 are
> indistinguishable.
>
> Therefore drop support for Xen 4.1 and earlier which removes a whole
> pile of compatibility code which makes future work (to use stable
> library interfaces provided by upstream) more difficult. In particular
> all supported versions now use a pointer as a libxc handle (4.1 and
> earlier used an integer, resulting in various shim layers).
>
> Also Xen 4.2 was the first version of Xen to formally support upstream
> QEMU (as a preview) so that makes sense as a cut-off now.
>
> This change drops all the configure-y and resulting ifdefs in a mostly
> mechanical way. A follow up will refactor wrappers which are now
> unused.
>
> Signed-off-by: Ian Campbell <address@hidden>
> ---
> configure | 100 +-----------------------------
> hw/i386/xen/xen_apic.c | 4 --
> include/hw/xen/xen.h | 4 --
> include/hw/xen/xen_common.h | 146
> ++------------------------------------------
> xen-hvm.c | 19 ------
> 5 files changed, 6 insertions(+), 267 deletions(-)
>
> diff --git a/configure b/configure
> index d4411a1..6a6fda6 100755
> --- a/configure
> +++ b/configure
> @@ -2111,100 +2111,9 @@ EOF
> xen_ctrl_version=420
> xen=yes
>
> - elif
> - cat > $TMPC <<EOF &&
> -#include <xenctrl.h>
> -#include <xs.h>
> -#include <stdint.h>
> -#include <xen/hvm/hvm_info_table.h>
> -#if !defined(HVM_MAX_VCPUS)
> -# error HVM_MAX_VCPUS not defined
> -#endif
> -int main(void) {
> - xs_daemon_open();
> - xc_interface_open(0, 0, 0);
> - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
> - xc_gnttab_open(NULL, 0);
> - xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
> - return 0;
> -}
> -EOF
> - compile_prog "" "$xen_libs"
> - then
> - xen_ctrl_version=410
> - xen=yes
> -
> - # Xen 4.0.0
> - elif
> - cat > $TMPC <<EOF &&
> -#include <xenctrl.h>
> -#include <xs.h>
> -#include <stdint.h>
> -#include <xen/hvm/hvm_info_table.h>
> -#if !defined(HVM_MAX_VCPUS)
> -# error HVM_MAX_VCPUS not defined
> -#endif
> -int main(void) {
> - struct xen_add_to_physmap xatp = {
> - .domid = 0, .space = XENMAPSPACE_gmfn, .idx = 0, .gpfn = 0,
> - };
> - xs_daemon_open();
> - xc_interface_open();
> - xc_gnttab_open();
> - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
> - xc_memory_op(0, XENMEM_add_to_physmap, &xatp);
> - return 0;
> -}
> -EOF
> - compile_prog "" "$xen_libs"
> - then
> - xen_ctrl_version=400
> - xen=yes
> -
> - # Xen 3.4.0
> - elif
> - cat > $TMPC <<EOF &&
> -#include <xenctrl.h>
> -#include <xs.h>
> -int main(void) {
> - struct xen_add_to_physmap xatp = {
> - .domid = 0, .space = XENMAPSPACE_gmfn, .idx = 0, .gpfn = 0,
> - };
> - xs_daemon_open();
> - xc_interface_open();
> - xc_gnttab_open();
> - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
> - xc_memory_op(0, XENMEM_add_to_physmap, &xatp);
> - return 0;
> -}
> -EOF
> - compile_prog "" "$xen_libs"
> - then
> - xen_ctrl_version=340
> - xen=yes
> -
> - # Xen 3.3.0
> - elif
> - cat > $TMPC <<EOF &&
> -#include <xenctrl.h>
> -#include <xs.h>
> -int main(void) {
> - xs_daemon_open();
> - xc_interface_open();
> - xc_gnttab_open();
> - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
> - return 0;
> -}
> -EOF
> - compile_prog "" "$xen_libs"
> - then
> - xen_ctrl_version=330
> - xen=yes
> -
> - # Xen version unsupported
> else
> if test "$xen" = "yes" ; then
> - feature_not_found "xen (unsupported version)" "Install supported xen
> (e.g. 4.0, 3.4, 3.3)"
> + feature_not_found "xen (unsupported version)" "Install supported xen
> (e.g. 4.2 onwards)"
We can rephrase the message now, maybe something like
"xen (unsupported version)" "Install a supported xen version (xen 4.2 or newer)"
> fi
> xen=no
> fi
> @@ -2218,15 +2127,10 @@ EOF
> fi
>
> if test "$xen_pci_passthrough" != "no"; then
> - if test "$xen" = "yes" && test "$linux" = "yes" &&
> - test "$xen_ctrl_version" -ge 340; then
> + if test "$xen" = "yes" && test "$linux" = "yes"; then
> xen_pci_passthrough=yes
> else
> if test "$xen_pci_passthrough" = "yes"; then
Given that the code has been greatly simplified, I think that we can get
rid of the test above.
> - if test "$xen_ctrl_version" -lt 340; then
> - error_exit "User requested feature Xen PCI Passthrough" \
> - "This feature does not work with Xen 3.3"
> - fi
> error_exit "User requested feature Xen PCI Passthrough" \
> " but this feature requires /sys from Linux"
> fi