From patchwork Tue Feb 9 15:45:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Hering X-Patchwork-Id: 12078473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AFF2C433DB for ; Tue, 9 Feb 2021 15:46:00 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 882F264E54 for ; Tue, 9 Feb 2021 15:45:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 882F264E54 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aepfle.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.83310.154701 (Exim 4.92) (envelope-from ) id 1l9VD4-0001TL-DD; Tue, 09 Feb 2021 15:45:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 83310.154701; Tue, 09 Feb 2021 15:45:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9VD4-0001T9-9j; Tue, 09 Feb 2021 15:45:50 +0000 Received: by outflank-mailman (input) for mailman id 83310; Tue, 09 Feb 2021 15:45:48 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9VD2-0001R5-ND for xen-devel@lists.xenproject.org; Tue, 09 Feb 2021 15:45:48 +0000 Received: from mo6-p00-ob.smtp.rzone.de (unknown [2a01:238:400:100::b]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 310bbf59-db49-48f3-94bd-4b1681ac95d7; Tue, 09 Feb 2021 15:45:46 +0000 (UTC) Received: from sender by smtp.strato.de (RZmta 47.17.1 DYNA|AUTH) with ESMTPSA id 604447x19Fjf1k7 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)) (Client did not present a certificate); Tue, 9 Feb 2021 16:45:41 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 310bbf59-db49-48f3-94bd-4b1681ac95d7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1612885545; s=strato-dkim-0002; d=aepfle.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=aII1TmKzcTAfe8t2sM/kmBYVk4jnNgWkXZv7CILKryQ=; b=GQvajl0CbHysFq2/9fJJdSsHk/hjyB3+YU30wqKdqzcC5KcQ6K1GJNvVSDTRvbUFjl ABn77RT+pWvpZ10/abSM/TyGiPMVXLBPtPTscubgq/Asrw9nTAQkzKJrhCmVUkNNVEQg +Wp8IESU45RtyiPknAQvwyyHKvYTEBEYjXVIWFuDF+K50mAwNEVn/JzH6DpJQ9J1GslE AvomINg+KfDIb6NtHHZJZ71ZLdjp+dFkCjUSZkMMC47nGlQge95zUjhLZVPkVJZoVXT4 R2j51kIokX/M7GdqHf+sKAgcFa2bjqq8WDGGVBA2ui6N8LK0rwpejHtUxPavoIOF3ojq TZxw== X-RZG-AUTH: ":P2EQZWCpfu+qG7CngxMFH1J+3q8wa/QXkBR9MXjAuzBW/OdlBZQ4AHSS3GxPjw==" X-RZG-CLASS-ID: mo00 From: Olaf Hering To: xen-devel@lists.xenproject.org Cc: Olaf Hering , Ian Jackson , Wei Liu Subject: [PATCH v20210209 1/4] tools: move CONFIG_DIR and XEN_CONFIG_DIR in paths.m4 Date: Tue, 9 Feb 2021 16:45:33 +0100 Message-Id: <20210209154536.10851-2-olaf@aepfle.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210209154536.10851-1-olaf@aepfle.de> References: <20210209154536.10851-1-olaf@aepfle.de> MIME-Version: 1.0 Upcoming changes need to reuse XEN_CONFIG_DIR. In its current location the assignment happens too late. Move it up in the file, along with CONFIG_DIR. Their only dependency is sysconfdir, which may also be adjusted in this file. No functional change intended. Signed-off-by: Olaf Hering Reviewed-by: Ian Jackson --- m4/paths.m4 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/m4/paths.m4 b/m4/paths.m4 index 1c107b1a61..a736f57d8d 100644 --- a/m4/paths.m4 +++ b/m4/paths.m4 @@ -34,6 +34,12 @@ if test "x$sysconfdir" = 'x${prefix}/etc' ; then esac fi +CONFIG_DIR=$sysconfdir +AC_SUBST(CONFIG_DIR) + +XEN_CONFIG_DIR=$CONFIG_DIR/xen +AC_SUBST(XEN_CONFIG_DIR) + AC_ARG_WITH([initddir], AS_HELP_STRING([--with-initddir=DIR], [Path to directory with sysv runlevel scripts. [SYSCONFDIR/init.d]]), @@ -128,15 +134,9 @@ AC_SUBST(XEN_LIB_DIR) SHAREDIR=$prefix/share AC_SUBST(SHAREDIR) -CONFIG_DIR=$sysconfdir -AC_SUBST(CONFIG_DIR) - INITD_DIR=$initddir_path AC_SUBST(INITD_DIR) -XEN_CONFIG_DIR=$CONFIG_DIR/xen -AC_SUBST(XEN_CONFIG_DIR) - XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts AC_SUBST(XEN_SCRIPT_DIR) From patchwork Tue Feb 9 15:45:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Hering X-Patchwork-Id: 12078477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92346C433E6 for ; Tue, 9 Feb 2021 15:46:03 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 32E3564E0D for ; Tue, 9 Feb 2021 15:46:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32E3564E0D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aepfle.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.83311.154713 (Exim 4.92) (envelope-from ) id 1l9VD9-0001Wi-M1; Tue, 09 Feb 2021 15:45:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 83311.154713; Tue, 09 Feb 2021 15:45:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9VD9-0001WY-IE; Tue, 09 Feb 2021 15:45:55 +0000 Received: by outflank-mailman (input) for mailman id 83311; Tue, 09 Feb 2021 15:45:53 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9VD7-0001R5-NH for xen-devel@lists.xenproject.org; Tue, 09 Feb 2021 15:45:53 +0000 Received: from mo6-p01-ob.smtp.rzone.de (unknown [2a01:238:400:200::c]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d0b968c8-2196-422f-9340-f280c55629c7; Tue, 09 Feb 2021 15:45:46 +0000 (UTC) Received: from sender by smtp.strato.de (RZmta 47.17.1 DYNA|AUTH) with ESMTPSA id 604447x19Fjf1k8 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)) (Client did not present a certificate); Tue, 9 Feb 2021 16:45:41 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d0b968c8-2196-422f-9340-f280c55629c7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1612885546; s=strato-dkim-0002; d=aepfle.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=fa5j5Ui9HQveRfkyt1TfxRyt7x+hRbirF8KvXljSbrY=; b=ORVRf+/ObjRTJPxO3DjyVCIf5lR2dIgrebamLEWloeFSSLOffRPHa1G7yLcYoi4mCz dG09APmwN9/iQsJ9E8/lFNKLch8Bg8mGIgozz9YvZDag6/QFTZ/es1/tagBeRv8z3jZd WKkN/CRd9rY12St/WLeu3A1zyc0jkzn7QGwaSd7wKMjvBgfwmV6GhXibjSMhMpGw6X/u kRN37fxq8+6Whuy8i0XcxXCJfLvWcreb78aPbQpS3FLfvbonuZTQWA+lNhNwkLozIeHl 5NxCfm4J5zss9NFEFF+EJ9jals0CTxa/BQ8Nih5C66HpYsMc7u40trL2cB1v7V7+Wk5b QADw== X-RZG-AUTH: ":P2EQZWCpfu+qG7CngxMFH1J+3q8wa/QXkBR9MXjAuzBW/OdlBZQ4AHSS3GxPjw==" X-RZG-CLASS-ID: mo00 From: Olaf Hering To: xen-devel@lists.xenproject.org Cc: Olaf Hering , Ian Jackson , Wei Liu Subject: [PATCH v20210209 2/4] tools: add with-xen-scriptdir configure option Date: Tue, 9 Feb 2021 16:45:34 +0100 Message-Id: <20210209154536.10851-3-olaf@aepfle.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210209154536.10851-1-olaf@aepfle.de> References: <20210209154536.10851-1-olaf@aepfle.de> MIME-Version: 1.0 Some distros plan for fresh installations will have an empty /etc, whose content will not be controlled by the package manager anymore. To make this possible, add a knob to configure to allow storing the hotplug scripts to libexec instead of /etc/xen/scripts. The current default remains unchanged, which is /etc/xen/scripts. Signed-off-by: Olaf Hering Reviewed-by: Ian Jackson --- m4/paths.m4 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/m4/paths.m4 b/m4/paths.m4 index a736f57d8d..7be314a3e2 100644 --- a/m4/paths.m4 +++ b/m4/paths.m4 @@ -76,6 +76,14 @@ AC_ARG_WITH([libexec-leaf-dir], [libexec_subdir=$withval], [libexec_subdir=$PACKAGE_TARNAME]) +AC_ARG_WITH([xen-scriptdir], + AS_HELP_STRING([--with-xen-scriptdir=DIR], + [Path to directory for dom0 hotplug scripts. [SYSCONFDIR/xen/scripts]]), + [xen_scriptdir_path=$withval], + [xen_scriptdir_path=$XEN_CONFIG_DIR/scripts]) +XEN_SCRIPT_DIR=$xen_scriptdir_path +AC_SUBST(XEN_SCRIPT_DIR) + AC_ARG_WITH([xen-dumpdir], AS_HELP_STRING([--with-xen-dumpdir=DIR], [Path to directory for domU crash dumps. [LOCALSTATEDIR/lib/xen/dump]]), @@ -137,9 +145,6 @@ AC_SUBST(SHAREDIR) INITD_DIR=$initddir_path AC_SUBST(INITD_DIR) -XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts -AC_SUBST(XEN_SCRIPT_DIR) - case "$host_os" in *freebsd*) XEN_LOCK_DIR=$localstatedir/lib ;; *netbsd*) XEN_LOCK_DIR=$rundir_path ;; From patchwork Tue Feb 9 15:45:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Hering X-Patchwork-Id: 12078479 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB465C433DB for ; Tue, 9 Feb 2021 15:46:08 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EA6764E08 for ; Tue, 9 Feb 2021 15:46:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EA6764E08 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aepfle.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.83312.154725 (Exim 4.92) (envelope-from ) id 1l9VDE-0001aF-0d; Tue, 09 Feb 2021 15:46:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 83312.154725; Tue, 09 Feb 2021 15:45:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9VDD-0001a8-S2; Tue, 09 Feb 2021 15:45:59 +0000 Received: by outflank-mailman (input) for mailman id 83312; Tue, 09 Feb 2021 15:45:58 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9VDC-0001R5-NL for xen-devel@lists.xenproject.org; Tue, 09 Feb 2021 15:45:58 +0000 Received: from mo6-p01-ob.smtp.rzone.de (unknown [2a01:238:400:200::c]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8129c05c-0e83-4df1-8465-e927c287ec4e; Tue, 09 Feb 2021 15:45:49 +0000 (UTC) Received: from sender by smtp.strato.de (RZmta 47.17.1 DYNA|AUTH) with ESMTPSA id 604447x19Fjf1k9 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)) (Client did not present a certificate); Tue, 9 Feb 2021 16:45:41 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8129c05c-0e83-4df1-8465-e927c287ec4e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1612885548; s=strato-dkim-0002; d=aepfle.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=zvrEgmv5X8uRsW5yGE7mKuAvmfklbHSa7m/edYazMSU=; b=Awrc1+37JQTq2YMQvkWL5ZXD2aXxW26igYavDfBmHxeDi3dirawjFEbThdAfDowjUv +JZUt+LNkeMZu5z8AygoiJMGgMD4TdT6mpdMZfWFm77M0M0yF8DLgsFRy1bs5eWpV3nv oEGXhsoeCEl7ckX8IzscNbn8l4gKKD5OJyVpjiSbq54JlrGTC+Mb2Ie0qIFtbNKoxchX 9hYkA6OB7v8i0J/YZv4N4CSR40AHs1V4QWwWNXGg3rbNq1V2P4W9DjAwAbI7lu/UD/6m 6wNpTlTQEv7m94UJRfnwhp8Ov8WGHxiE4/oxotXTqbDarMxmQRFabzBMlT4M/Wk/vmIl 0TQQ== X-RZG-AUTH: ":P2EQZWCpfu+qG7CngxMFH1J+3q8wa/QXkBR9MXjAuzBW/OdlBZQ4AHSS3GxPjw==" X-RZG-CLASS-ID: mo00 From: Olaf Hering To: xen-devel@lists.xenproject.org Cc: Olaf Hering , Ian Jackson , Wei Liu , Anthony PERARD Subject: [PATCH v20210209 3/4] xl: optionally print timestamps when running xl commands Date: Tue, 9 Feb 2021 16:45:35 +0100 Message-Id: <20210209154536.10851-4-olaf@aepfle.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210209154536.10851-1-olaf@aepfle.de> References: <20210209154536.10851-1-olaf@aepfle.de> MIME-Version: 1.0 Add a global option "-T" to xl to enable timestamps in the output from libxl and libxc. This is most useful with long running commands such as "migrate". During 'xl -v.. migrate domU host' a large amount of debug is generated. It is difficult to map each line to the sending and receiving side. Also the time spent for migration is not reported. With 'xl -T migrate domU host' both sides will print timestamps and also the pid of the invoked xl process to make it more obvious which side produced a given log line. Note: depending on the command, xl itself also produces other output which does not go through libxentoollog. As a result such output will not have timestamps prepended. This change adds also the missing "-t" flag to "xl help" output. Signed-off-by: Olaf Hering Reviewed-by: Ian Jackson --- docs/man/xl.1.pod.in | 4 ++++ tools/xl/xl.c | 18 +++++++++++++----- tools/xl/xl.h | 1 + tools/xl/xl_migrate.c | 3 ++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in index 618c195148..e2176bd696 100644 --- a/docs/man/xl.1.pod.in +++ b/docs/man/xl.1.pod.in @@ -86,6 +86,10 @@ Always use carriage-return-based overwriting for displaying progress messages without scrolling the screen. Without -t, this is done only if stderr is a tty. +=item B<-T> + +Include timestamps and pid of the xl process in output. + =back =head1 DOMAIN SUBCOMMANDS diff --git a/tools/xl/xl.c b/tools/xl/xl.c index 2a5ddd4390..3a89295802 100644 --- a/tools/xl/xl.c +++ b/tools/xl/xl.c @@ -52,6 +52,7 @@ libxl_bitmap global_pv_affinity_mask; enum output_format default_output_format = OUTPUT_FORMAT_JSON; int claim_mode = 1; bool progress_use_cr = 0; +bool timestamps = 0; int max_grant_frames = -1; int max_maptrack_frames = -1; libxl_domid domid_policy = INVALID_DOMID; @@ -365,8 +366,9 @@ int main(int argc, char **argv) int ret; void *config_data = 0; int config_len = 0; + unsigned int xtl_flags = 0; - while ((opt = getopt(argc, argv, "+vftN")) >= 0) { + while ((opt = getopt(argc, argv, "+vftTN")) >= 0) { switch (opt) { case 'v': if (minmsglevel > 0) minmsglevel--; @@ -380,6 +382,9 @@ int main(int argc, char **argv) case 't': progress_use_cr = 1; break; + case 'T': + timestamps = 1; + break; default: fprintf(stderr, "unknown global option\n"); exit(EXIT_FAILURE); @@ -394,8 +399,11 @@ int main(int argc, char **argv) } opterr = 0; - logger = xtl_createlogger_stdiostream(stderr, minmsglevel, - (progress_use_cr ? XTL_STDIOSTREAM_PROGRESS_USE_CR : 0)); + if (progress_use_cr) + xtl_flags |= XTL_STDIOSTREAM_PROGRESS_USE_CR; + if (timestamps) + xtl_flags |= XTL_STDIOSTREAM_SHOW_DATE | XTL_STDIOSTREAM_SHOW_PID; + logger = xtl_createlogger_stdiostream(stderr, minmsglevel, xtl_flags); if (!logger) exit(EXIT_FAILURE); xl_ctx_alloc(); @@ -457,7 +465,7 @@ void help(const char *command) struct cmd_spec *cmd; if (!command || !strcmp(command, "help")) { - printf("Usage xl [-vfN] [args]\n\n"); + printf("Usage xl [-vfNtT] [args]\n\n"); printf("xl full list of subcommands:\n\n"); for (i = 0; i < cmdtable_len; i++) { printf(" %-19s ", cmd_table[i].cmd_name); @@ -468,7 +476,7 @@ void help(const char *command) } else { cmd = cmdtable_lookup(command); if (cmd) { - printf("Usage: xl [-v%s%s] %s %s\n\n%s.\n\n", + printf("Usage: xl [-vtT%s%s] %s %s\n\n%s.\n\n", cmd->modifies ? "f" : "", cmd->can_dryrun ? "N" : "", cmd->cmd_name, diff --git a/tools/xl/xl.h b/tools/xl/xl.h index 06569c6c4a..137a29077c 100644 --- a/tools/xl/xl.h +++ b/tools/xl/xl.h @@ -269,6 +269,7 @@ extern int run_hotplug_scripts; extern int dryrun_only; extern int claim_mode; extern bool progress_use_cr; +extern bool timestamps; extern xentoollog_level minmsglevel; #define minmsglevel_default XTL_PROGRESS extern char *lockfile; diff --git a/tools/xl/xl_migrate.c b/tools/xl/xl_migrate.c index 0813beb801..b8594f44a5 100644 --- a/tools/xl/xl_migrate.c +++ b/tools/xl/xl_migrate.c @@ -592,9 +592,10 @@ int main_migrate(int argc, char **argv) } else { verbose_len = (minmsglevel_default - minmsglevel) + 2; } - xasprintf(&rune, "exec %s %s xl%s%.*s migrate-receive%s%s%s", + xasprintf(&rune, "exec %s %s xl%s%s%.*s migrate-receive%s%s%s", ssh_command, host, pass_tty_arg ? " -t" : "", + timestamps ? " -T" : "", verbose_len, verbose_buf, daemonize ? "" : " -e", debug ? " -d" : "", From patchwork Tue Feb 9 15:45:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Hering X-Patchwork-Id: 12078481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EB23C43381 for ; Tue, 9 Feb 2021 15:46:14 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F13364E0D for ; Tue, 9 Feb 2021 15:46:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F13364E0D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aepfle.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.83313.154737 (Exim 4.92) (envelope-from ) id 1l9VDJ-0001fO-9b; Tue, 09 Feb 2021 15:46:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 83313.154737; Tue, 09 Feb 2021 15:46:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9VDJ-0001fE-4y; Tue, 09 Feb 2021 15:46:05 +0000 Received: by outflank-mailman (input) for mailman id 83313; Tue, 09 Feb 2021 15:46:03 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9VDH-0001R5-NO for xen-devel@lists.xenproject.org; Tue, 09 Feb 2021 15:46:03 +0000 Received: from mo6-p01-ob.smtp.rzone.de (unknown [2a01:238:400:200::c]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 739a3183-5188-41ff-8023-ab4e5cfe0f35; Tue, 09 Feb 2021 15:45:49 +0000 (UTC) Received: from sender by smtp.strato.de (RZmta 47.17.1 DYNA|AUTH) with ESMTPSA id 604447x19Fjg1kA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)) (Client did not present a certificate); Tue, 9 Feb 2021 16:45:42 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 739a3183-5188-41ff-8023-ab4e5cfe0f35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1612885548; s=strato-dkim-0002; d=aepfle.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=i1NPX2zWTNw88m/1NcvmRDBKDd6HKMtx2izL2PhwkGc=; b=YyQOQJEab1mtpgyyEF+N4rhJCncFlCYsovqIpocTFLkHF6oZcXRc0St6/iGKr2Mkpe UeMGwTa+t4iKFVbU46JNBJmlA9XKgljK70d40SUbTrwKevdl/tcB+2UkerAL1AjyptLE QtVvSEDEKdJY0Tg5whzscUk6Md5oBadZkrIcBEHuIkrGHKhOMg7hyWrWDtP6LSnD7Y/w qVe/DXeHc1+j4t4+ZBtZJihbxpFdNILXNA44gkKBG9TLygUQWMbvv9rEEYqRaUsKGN7Y H3JDdvjfTshGyU3sAEGSdAHo7zZ3oCtjkJdS/3xuRKiMvEWe4JkfF0Cmk0ej9TYNggxU 6cIQ== X-RZG-AUTH: ":P2EQZWCpfu+qG7CngxMFH1J+3q8wa/QXkBR9MXjAuzBW/OdlBZQ4AHSS3GxPjw==" X-RZG-CLASS-ID: mo00 From: Olaf Hering To: xen-devel@lists.xenproject.org Cc: Olaf Hering , Ian Jackson , Wei Liu , Anthony PERARD Subject: [PATCH v20210209 4/4] xl: disable --debug option for xl migrate Date: Tue, 9 Feb 2021 16:45:36 +0100 Message-Id: <20210209154536.10851-5-olaf@aepfle.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210209154536.10851-1-olaf@aepfle.de> References: <20210209154536.10851-1-olaf@aepfle.de> MIME-Version: 1.0 xl migrate --debug used to track every pfn in every batch of pages. Since commit cfa955591caea5d7ec505cdcbf4442f2d6e889e1 from Xen 4.6 the debug flag changed meaning from "verify transferred memory during live migration" to "verify transferred memory in remus/colo". At least xl will not be able to trigger execution of the verifying code in send_domain_memory_live anymore. Remove "--debug" from "xl migrate -h" output. Remove "--debug" from from xl man page. Do not send "-d" as potential option for "xl migrate-receive" anymore. Do not pass the flag LIBXL_SUSPEND_DEBUG anymore to libxl_domain_suspend. Continue to recognize "--debug" as valid option for "xl migrate". Continue to recognize "-d" as valid option for "xl migrate-receive". Signed-off-by: Olaf Hering --- docs/man/xl.1.pod.in | 4 ---- tools/xl/xl_cmdtable.c | 1 - tools/xl/xl_migrate.c | 15 ++++++--------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in index e2176bd696..b14196ccfe 100644 --- a/docs/man/xl.1.pod.in +++ b/docs/man/xl.1.pod.in @@ -479,10 +479,6 @@ domain. See the corresponding option of the I subcommand. Send the specified file instead of the file used on creation of the domain. -=item B<--debug> - -Display huge (!) amount of debug information during the migration process. - =item B<-p> Leave the domain on the receive side paused after migration. diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c index 07f54daabe..150f4cd1d3 100644 --- a/tools/xl/xl_cmdtable.c +++ b/tools/xl/xl_cmdtable.c @@ -171,7 +171,6 @@ struct cmd_spec cmd_table[] = { " migrate-receive [-d -e]\n" "-e Do not wait in the background (on ) for the death\n" " of the domain.\n" - "--debug Print huge (!) amount of debug during the migration process.\n" "-p Do not unpause domain after migrating it.\n" "-D Preserve the domain id" }, diff --git a/tools/xl/xl_migrate.c b/tools/xl/xl_migrate.c index b8594f44a5..e4e4f918c7 100644 --- a/tools/xl/xl_migrate.c +++ b/tools/xl/xl_migrate.c @@ -177,8 +177,7 @@ static void migrate_do_preamble(int send_fd, int recv_fd, pid_t child, } static void migrate_domain(uint32_t domid, int preserve_domid, - const char *rune, int debug, - const char *override_config_file) + const char *rune, const char *override_config_file) { pid_t child = -1; int rc; @@ -204,8 +203,6 @@ static void migrate_domain(uint32_t domid, int preserve_domid, xtl_stdiostream_adjust_flags(logger, XTL_STDIOSTREAM_HIDE_PROGRESS, 0); - if (debug) - flags |= LIBXL_SUSPEND_DEBUG; rc = libxl_domain_suspend(ctx, domid, send_fd, flags, NULL); if (rc) { fprintf(stderr, "migration sender: libxl_domain_suspend failed" @@ -500,6 +497,7 @@ int main_migrate_receive(int argc, char **argv) monitor = 0; break; case 'd': + /* For compatibility with older variants of xl */ debug = 1; break; case 'r': @@ -537,7 +535,7 @@ int main_migrate(int argc, char **argv) const char *ssh_command = "ssh"; char *rune = NULL; char *host; - int opt, daemonize = 1, monitor = 1, debug = 0, pause_after_migration = 0; + int opt, daemonize = 1, monitor = 1, pause_after_migration = 0; int preserve_domid = 0; static struct option opts[] = { {"debug", 0, 0, 0x100}, @@ -566,7 +564,7 @@ int main_migrate(int argc, char **argv) preserve_domid = 1; break; case 0x100: /* --debug */ - debug = 1; + /* ignored for compatibility with older variants of xl */ break; case 0x200: /* --live */ /* ignored for compatibility with xm */ @@ -592,17 +590,16 @@ int main_migrate(int argc, char **argv) } else { verbose_len = (minmsglevel_default - minmsglevel) + 2; } - xasprintf(&rune, "exec %s %s xl%s%s%.*s migrate-receive%s%s%s", + xasprintf(&rune, "exec %s %s xl%s%s%.*s migrate-receive%s%s", ssh_command, host, pass_tty_arg ? " -t" : "", timestamps ? " -T" : "", verbose_len, verbose_buf, daemonize ? "" : " -e", - debug ? " -d" : "", pause_after_migration ? " -p" : ""); } - migrate_domain(domid, preserve_domid, rune, debug, config_filename); + migrate_domain(domid, preserve_domid, rune, config_filename); return EXIT_SUCCESS; }