From patchwork Tue Sep 19 18:06:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jennifer Herbert X-Patchwork-Id: 9959915 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 C268260568 for ; Tue, 19 Sep 2017 18:16:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B143A28C1C for ; Tue, 19 Sep 2017 18:16:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A61B328EE2; Tue, 19 Sep 2017 18:16:17 +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 A72AD28E7E for ; Tue, 19 Sep 2017 18:16:16 +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 1duN1u-0007aP-Ro; Tue, 19 Sep 2017 18:13:54 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duN1t-0007a4-4E for xen-devel@lists.xenproject.org; Tue, 19 Sep 2017 18:13:53 +0000 Received: from [193.109.254.147] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-2.bemta-6.messagelabs.com id 73/89-18817-06E51C95; Tue, 19 Sep 2017 18:13:52 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKIsWRWlGSWpSXmKPExsXitHRDpG583MF Ig8mTLS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oy/q66wFLxUq5j8cD1jA+Mm2S5GDg4JAX+J gy9jQEw2AROJNw9Cuxi5OEQEWhglFp/axQ4SZxYwkmg7yt3FyMkhLGAo8fbCTTYQm0VAVWL1o s9gNq+Al8TJXR1MILaEgILElIfvmUFsTgFvie13DrOD2EJANX/bTrJB2BoSZxcsYoXoFZQ4Of MJC4jNLCAhcfDFC+YJjLyzkKRmIUktYGRaxahRnFpUllqka2igl1SUmZ5RkpuYmQPkmenlphY XJ6an5iQmFesl5+duYgQGDgMQ7GA8/j7uEKMkB5OSKG9t7MFIIb6k/JTKjMTijPii0pzU4kOM MhwcShK8jSA5waLU9NSKtMwcYAjDpCU4eJREeAtA0rzFBYm5xZnpEKlTjMYcxzZd/sPE0XHz7 h8mIZa8/LxUKXHeAJBSAZDSjNI8uEGw2LrEKCslzMsIdJoQT0FqUW5mCar8K0ZxDkYlYd6NIF N4MvNK4Pa9AjqFCeiU7A0HQE4pSURISTUwzp0+fbVxpy+TG+OSY/e23Ol7a5/3Sr/2muJUAbe zTPPEpzl5vHB047cTY7bVcfDWspo0Ja5OoEbUcdljw0LJT6c2rnpYslf9xor5tvle9857HE2X yaz+vaXj/TpNlk98ouo9D6VXaxzrNpq24a7Z6ZOl4rkL7dN3ZKSkFWbk/18Xevh14bcgJZbij ERDLeai4kQAAg4yg6gCAAA= X-Env-Sender: prvs=42868d135=jennifer.herbert@citrix.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1505844830!64696209!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 5755 invoked from network); 19 Sep 2017 18:13:51 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-15.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 19 Sep 2017 18:13:51 -0000 X-IronPort-AV: E=Sophos;i="5.42,418,1500940800"; d="scan'208";a="440356270" From: Jennifer Herbert To: Ian Jackson , Wei Liu , , Date: Tue, 19 Sep 2017 19:06:25 +0100 Message-ID: <1505844387-2224-2-git-send-email-Jennifer.Herbert@citrix.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505844387-2224-1-git-send-email-Jennifer.Herbert@citrix.com> References: <1505844387-2224-1-git-send-email-Jennifer.Herbert@citrix.com> MIME-Version: 1.0 Cc: Jennifer Herbert Subject: [Xen-devel] [PATCH v2 1/3] Tidy libxc xc_domain_save 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: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Tidy up libxc's xc_domain_save, removing unused paramaters max_iters and max_factor, making matching changes to libxl. Signed-off-by: Joshua Otto Signed-off-by: Jennifer Herbert Reviewed-by: Paul Durrant Acked-by: Wei Liu --- tools/libxc/include/xenguest.h | 4 ++-- tools/libxc/xc_nomigrate.c | 3 +-- tools/libxc/xc_sr_save.c | 8 +++----- tools/libxl/libxl_save_callout.c | 4 ++-- tools/libxl/libxl_save_helper.c | 7 ++----- 5 files changed, 10 insertions(+), 16 deletions(-) diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h index 5cd8111..6626f0c 100644 --- a/tools/libxc/include/xenguest.h +++ b/tools/libxc/include/xenguest.h @@ -100,8 +100,8 @@ typedef enum { * doesn't use checkpointing * @return 0 on success, -1 on failure */ -int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iters, - uint32_t max_factor, uint32_t flags /* XCFLAGS_xxx */, +int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, + uint32_t flags /* XCFLAGS_xxx */, struct save_callbacks* callbacks, int hvm, xc_migration_stream_t stream_type, int recv_fd); diff --git a/tools/libxc/xc_nomigrate.c b/tools/libxc/xc_nomigrate.c index 317c8ce..fe8f68c 100644 --- a/tools/libxc/xc_nomigrate.c +++ b/tools/libxc/xc_nomigrate.c @@ -20,8 +20,7 @@ #include #include -int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iters, - uint32_t max_factor, uint32_t flags, +int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t flags, struct save_callbacks* callbacks, int hvm, xc_migration_stream_t stream_type, int recv_fd) { diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c index ca6913b..1e7502d 100644 --- a/tools/libxc/xc_sr_save.c +++ b/tools/libxc/xc_sr_save.c @@ -916,9 +916,8 @@ static int save(struct xc_sr_context *ctx, uint16_t guest_type) }; int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, - uint32_t max_iters, uint32_t max_factor, uint32_t flags, - struct save_callbacks* callbacks, int hvm, - xc_migration_stream_t stream_type, int recv_fd) + uint32_t flags, struct save_callbacks* callbacks, + int hvm, xc_migration_stream_t stream_type, int recv_fd) { struct xc_sr_context ctx = { @@ -955,8 +954,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, if ( ctx.save.checkpointed == XC_MIG_STREAM_COLO ) assert(callbacks->wait_checkpoint); - DPRINTF("fd %d, dom %u, max_iters %u, max_factor %u, flags %u, hvm %d", - io_fd, dom, max_iters, max_factor, flags, hvm); + DPRINTF("fd %d, dom %u, flags %u, hvm %d", io_fd, dom, flags, hvm); if ( xc_domain_getinfo(xch, dom, 1, &ctx.dominfo) != 1 ) { diff --git a/tools/libxl/libxl_save_callout.c b/tools/libxl/libxl_save_callout.c index 891c669..6452d70 100644 --- a/tools/libxl/libxl_save_callout.c +++ b/tools/libxl/libxl_save_callout.c @@ -89,8 +89,8 @@ void libxl__xc_domain_save(libxl__egc *egc, libxl__domain_save_state *dss, libxl__srm_callout_enumcallbacks_save(&shs->callbacks.save.a); const unsigned long argnums[] = { - dss->domid, 0, 0, dss->xcflags, dss->hvm, - cbflags, dss->checkpointed_stream, + dss->domid, dss->xcflags, dss->hvm, cbflags, + dss->checkpointed_stream, }; shs->ao = ao; diff --git a/tools/libxl/libxl_save_helper.c b/tools/libxl/libxl_save_helper.c index 1dece23..38089a0 100644 --- a/tools/libxl/libxl_save_helper.c +++ b/tools/libxl/libxl_save_helper.c @@ -251,8 +251,6 @@ int main(int argc, char **argv) io_fd = atoi(NEXTARG); recv_fd = atoi(NEXTARG); uint32_t dom = strtoul(NEXTARG,0,10); - uint32_t max_iters = strtoul(NEXTARG,0,10); - uint32_t max_factor = strtoul(NEXTARG,0,10); uint32_t flags = strtoul(NEXTARG,0,10); int hvm = atoi(NEXTARG); unsigned cbflags = strtoul(NEXTARG,0,10); @@ -264,9 +262,8 @@ int main(int argc, char **argv) startup("save"); setup_signals(save_signal_handler); - r = xc_domain_save(xch, io_fd, dom, max_iters, max_factor, flags, - &helper_save_callbacks, hvm, stream_type, - recv_fd); + r = xc_domain_save(xch, io_fd, dom, flags, &helper_save_callbacks, + hvm, stream_type, recv_fd); complete(r); } else if (!strcmp(mode,"--restore-domain")) {