From patchwork Thu Sep 14 15:33:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jennifer Herbert X-Patchwork-Id: 9953391 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 24C1F603F3 for ; Thu, 14 Sep 2017 15:38:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D72F29133 for ; Thu, 14 Sep 2017 15:38:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1212C2913E; Thu, 14 Sep 2017 15:38:48 +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 2B87E29149 for ; Thu, 14 Sep 2017 15:38:44 +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 1dsWBO-0006Rp-5e; Thu, 14 Sep 2017 15:36:02 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsWBM-0006QG-NT for xen-devel@lists.xenproject.org; Thu, 14 Sep 2017 15:36:00 +0000 Received: from [193.109.254.147] by server-10.bemta-6.messagelabs.com id E2/04-03642-FD1AAB95; Thu, 14 Sep 2017 15:35:59 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCIsWRWlGSWpSXmKPExsXitHRDpO79hbs iDd6ulbf4vmUykwOjx+EPV1gCGKNYM/OS8isSWDNuP5vKVnBHteJ+3wbGBsaNMl2MnBwSAv4S r7b0M3YxcnCwCZhIvHkQ2sXIxSEi0MIosfjULnaQOLOAkUTbUW6QcmEBPYnpj84zgtgsAqoS/ z++YQYp4RXwkXj/SgliooLElIfvmUFsTgFfif3TvrOBlAgBlRxe7g0SFhLQkDi7YBEriM0rIC hxcuYTFhCbWUBC4uCLF8wTGHlnIUnNQpJawMi0ilGjOLWoLLVI19BQL6koMz2jJDcxM0fX0MB MLze1uDgxPTUnMalYLzk/dxMjMGwYgGAH46dlAYcYJTmYlER59+rujBTiS8pPqcxILM6ILyrN SS0+xCjDwaEkwcsADEMhwaLU9NSKtMwcYADDpCU4eJREeBMXAKV5iwsSc4sz0yFSpxiNOY5tu vyHiaPj5t0/TEIsefl5qVLivIwgkwRASjNK8+AGwSLrEqOslDAvI9BpQjwFqUW5mSWo8q8YxT kYlYR500AW8mTmlcDtewV0ChPQKWdO7wA5pSQRISXVwLipsStTrazE8fm1jYKGFY3cUkfubRb 9VPorO2LbwcitT/1fZ7iXyTxysmcTYVgTb7Xq5PeZnsrzAn8trDi88Ihn5lPBmHyFtQ/Ca9R9 OwNX2Yc2MQpEs14wjDlRumWCQ9x/YXb9Z5dWh/0TumjmINovorsv/K3+g2vRHJeibVscOu/P9 q1WVGIpzkg01GIuKk4EAL0RSamnAgAA X-Env-Sender: prvs=423118b0b=jennifer.herbert@citrix.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1505403355!63944170!2 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 21938 invoked from network); 14 Sep 2017 15:35:59 -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; 14 Sep 2017 15:35:59 -0000 X-IronPort-AV: E=Sophos;i="5.42,393,1500940800"; d="scan'208";a="439785055" From: Jennifer Herbert To: Ian Jackson , Wei Liu , , Date: Thu, 14 Sep 2017 16:33:57 +0100 Message-ID: <1505403241-111368-2-git-send-email-Jennifer.Herbert@citrix.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505403241-111368-1-git-send-email-Jennifer.Herbert@citrix.com> References: <1505403241-111368-1-git-send-email-Jennifer.Herbert@citrix.com> MIME-Version: 1.0 Cc: Jennifer Herbert Subject: [Xen-devel] [PATCH 1/2] 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: Jennifer Herbert Reviewed-by: Paul Durrant --- 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")) {