From patchwork Mon May 20 10:18:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 10950789 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0656933 for ; Mon, 20 May 2019 10:20:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0B5728785 for ; Mon, 20 May 2019 10:20:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9443128787; Mon, 20 May 2019 10:20:46 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 399D028785 for ; Mon, 20 May 2019 10:20:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hSfN8-00084w-Oo; Mon, 20 May 2019 10:18:22 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hSfN7-00084a-3O for xen-devel@lists.xenproject.org; Mon, 20 May 2019 10:18:21 +0000 X-Inumbo-ID: 977aba84-7ae8-11e9-8980-bc764e045a96 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 977aba84-7ae8-11e9-8980-bc764e045a96; Mon, 20 May 2019 10:18:20 +0000 (UTC) Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=SoftFail smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@MIAPEX02MSOL01.citrite.net Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: SoftFail (esa1.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com is inclined to not designate 23.29.105.83 as permitted sender) identity=mailfrom; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 include:spf.citrix.com include:spf2.citrix.com include:ironport.citrix.com exists:%{i}._spf.mta.salesforce.com ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@MIAPEX02MSOL01.citrite.net) identity=helo; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@MIAPEX02MSOL01.citrite.net"; x-conformance=sidf_compatible IronPort-SDR: LKv5Zr2d4JflOrzLK105P6AbjiMap8a2SxIsNWKV8Kvevb77qalPy3K91Obvj4qnuSk1ZH3nbu /3NNQ9blhKRZAlcE3RR1He8wO54NcIaThuH/Gof1Gc28KPV5fbSWwvScSNPTGZD1UQN1rpviQK eYtYUT/UAKa3p9dKyzEk4HZZUT4IhxeqbjYcRtRZlVQDMomZfWm3JKWQdWx95JgxwhIajBMQr8 zDDcwSkAkxbuO4+sbFowI2wF80RXYEGLhLjPVqm+rZx8BnTj7zwB4SKa/JhEj+7VKFkFh/oqUB wVo= X-SBRS: 2.7 X-MesageID: 641031 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 23.29.105.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.60,491,1549947600"; d="scan'208";a="641031" From: Andrew Cooper To: Xen-devel Date: Mon, 20 May 2019 11:18:14 +0100 Message-ID: <1558347494-21640-5-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1558347494-21640-1-git-send-email-andrew.cooper3@citrix.com> References: <1558347494-21640-1-git-send-email-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 4/4] x86/boot: Link opt_dom0_verbose to CONFIG_VERBOSE_DEBUG X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP We currently have an asymmetric setup where CONFIG_VERBOSE_DEBUG controls extra diagnostics for a PV dom0, and opt_dom0_verbose controls extra diagnostics for a PVH dom0. Default opt_dom0_verbose to CONFIG_VERBOSE_DEBUG and use opt_dom0_verbose consistently. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/dom0_build.c | 2 +- xen/arch/x86/pv/dom0_build.c | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index e6d241e..51dc8ae 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -687,7 +687,8 @@ Controls for how dom0 is constructed on x86 systems. guests do no require any paging support by default. * The `verbose` boolean is intended for diagnostics, and prints out extra - information during the dom0 build. It defaults to false. + information during the dom0 build. It defaults to the compile time choice + of `CONFIG_VERBOSE_DEBUG`. ### dom0-iommu = List of [ passthrough=, strict=, map-inclusive=, diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index 93e5531..9b06363 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -281,7 +281,7 @@ struct vcpu *__init alloc_dom0_vcpu0(struct domain *dom0) bool __initdata opt_dom0_shadow; #endif bool __initdata opt_dom0_pvh = !IS_ENABLED(CONFIG_PV); -bool __initdata opt_dom0_verbose; +bool __initdata opt_dom0_verbose = IS_ENABLED(CONFIG_VERBOSE_DEBUG); static int __init parse_dom0_param(const char *s) { diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index 4a1526a..903611f 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -345,9 +345,10 @@ int __init dom0_construct_pv(struct domain *d, if ( (rc = elf_init(&elf, image_start, image_len)) != 0 ) return rc; -#ifdef CONFIG_VERBOSE_DEBUG - elf_set_verbose(&elf); -#endif + + if ( opt_dom0_verbose ) + elf_set_verbose(&elf); + elf_parse_binary(&elf); if ( (rc = elf_xen_parse(&elf, &parms)) != 0 ) goto out;