From patchwork Wed Apr 13 23:37:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Fehlig X-Patchwork-Id: 8829681 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AF8D09F3A0 for ; Wed, 13 Apr 2016 23:39:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2CD7202DD for ; Wed, 13 Apr 2016 23:39:14 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id DF73B202D1 for ; Wed, 13 Apr 2016 23:39:13 +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 1aqULc-00053K-D2; Wed, 13 Apr 2016 23:37:24 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqULb-000536-3s for xen-devel@lists.xen.org; Wed, 13 Apr 2016 23:37:23 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id 42/00-28710-238DE075; Wed, 13 Apr 2016 23:37:22 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrILMWRWlGSWpSXmKPExsXS6fgrUNfwBl+ 4waSJehZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bzCefYC6bIVvzqvM3WwDhZvIuRk0NIYAuj RPtVDhCbTUBZ4mXnLVYQW0RASmLRvQXMIDazgLXEt9aVYHFhATOJCau3gsVZBFQl/netYQKxe QXsJea2nmQDsSUE5CTOH//JPIGRYwEjwypGjeLUorLUIl1DE72kosz0jJLcxMwcXUMDU73c1O LixPTUnMSkYr3k/NxNjECvMADBDsazpz0PMUpyMCmJ8pqs4gsX4kvKT6nMSCzOiC8qzUktPsQ ow8GhJMH74xpQTrAoNT21Ii0zBxgeMGkJDh4lEd7XIGne4oLE3OLMdIjUKUZFKXHe2yAJAZBE RmkeXBssJC8xykoJ8zICHSLEU5BalJtZgir/ilGcg1FJmNfmOtAUnsy8Erjpr4AWMwEtLnvHC 7K4JBEhJdXAmFfHPpG1WcyHX+fNCw7OX0qdSx2XcifOfh+Tvlf36vFrn5w53j1+ufXq/vArIc 96i7fO3qbZ+iaXOcOZRU8xSNzq2S5e2Vkea67tXcRUunyX4n+DJbEsfc2N5qoOneEvzh1I/mN 1svbLyl6HFiaFJo306cLTajaVnGZlrSqQ5RIQcFq1+MRHJZbijERDLeai4kQAKxi73kQCAAA= X-Env-Sender: jfehlig@suse.com X-Msg-Ref: server-9.tower-206.messagelabs.com!1460590639!34675952!1 X-Originating-IP: [137.65.250.81] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 57295 invoked from network); 13 Apr 2016 23:37:21 -0000 Received: from smtp2.provo.novell.com (HELO smtp2.provo.novell.com) (137.65.250.81) by server-9.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 13 Apr 2016 23:37:21 -0000 Received: from talkeetna.gns.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (NOT encrypted); Wed, 13 Apr 2016 17:37:17 -0600 From: Jim Fehlig To: libvir-list@redhat.com Date: Wed, 13 Apr 2016 17:37:05 -0600 Message-Id: <1460590625-3805-1-git-send-email-jfehlig@suse.com> X-Mailer: git-send-email 2.1.4 Cc: Jim Fehlig , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH] libxl: use LIBXL_API_VERSION 0x040200 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To ensure the libvirt libxl driver will build with future versions of Xen where the libxl API may change in incompatible ways, explicitly use LIBXL_API_VERSION 0x040200. The libxl driver does use new libxl APIs that have been added since Xen 4.2, but currently it does not make use of any changes made to existing APIs such as libxl_domain_create_restore or libxl_set_vcpuaffinity. The version can be bumped if/when the libxl driver consumes the changed APIs. Further details can be found in the following discussion thread https://www.redhat.com/archives/libvir-list/2016-April/msg00178.html Signed-off-by: Jim Fehlig Reviewed-by: Dario Faggioli --- src/Makefile.am | 1 + src/libxl/libxl_conf.h | 12 ------------ src/libxl/libxl_domain.c | 15 --------------- 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 08ff301..259a474 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1311,6 +1311,7 @@ endif ! WITH_DRIVER_MODULES libvirt_driver_libxl_impl_la_CFLAGS = \ $(LIBXL_CFLAGS) \ + -DLIBXL_API_VERSION=0x040200 \ -I$(srcdir)/access \ -I$(srcdir)/conf \ -I$(srcdir)/secret \ diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index 3c0eafb..24e2911 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -69,18 +69,6 @@ # endif -/* libxl interface for setting VCPU affinity changed in 4.5. In fact, a new - * parameter has been added, representative of 'VCPU soft affinity'. If one - * does not care about it (and that's libvirt case), passing NULL is the - * right thing to do. To mark that change, LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY - * is defined. */ -# ifdef LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY -# define libxl_set_vcpuaffinity(ctx, domid, vcpuid, map) \ - libxl_set_vcpuaffinity((ctx), (domid), (vcpuid), (map), NULL) -# define libxl_set_vcpuaffinity_all(ctx, domid, max_vcpus, map) \ - libxl_set_vcpuaffinity_all((ctx), (domid), (max_vcpus), (map), NULL) -# endif - typedef struct _libxlDriverPrivate libxlDriverPrivate; typedef libxlDriverPrivate *libxlDriverPrivatePtr; diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index aed904b..192a506 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -981,9 +981,6 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm, int managed_save_fd = -1; libxlDomainObjPrivatePtr priv = vm->privateData; libxlDriverConfigPtr cfg; -#ifdef LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS - libxl_domain_restore_params params; -#endif virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr; libxl_asyncprogress_how aop_console_how; @@ -1070,20 +1067,8 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm, ret = libxl_domain_create_new(cfg->ctx, &d_config, &domid, NULL, &aop_console_how); } else { -#if defined(LIBXL_HAVE_DOMAIN_CREATE_RESTORE_SEND_BACK_FD) - params.checkpointed_stream = 0; - ret = libxl_domain_create_restore(cfg->ctx, &d_config, &domid, - restore_fd, -1, ¶ms, NULL, - &aop_console_how); -#elif defined(LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS) - params.checkpointed_stream = 0; - ret = libxl_domain_create_restore(cfg->ctx, &d_config, &domid, - restore_fd, ¶ms, NULL, - &aop_console_how); -#else ret = libxl_domain_create_restore(cfg->ctx, &d_config, &domid, restore_fd, NULL, &aop_console_how); -#endif } virObjectLock(vm);