From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A4B0EC38142 for ; Fri, 27 Jan 2023 13:07:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+F0kGBiJme6T8Bgqh41ZO80x7Df5QpXaRDVB1jtP1dY=; b=ZM0+eHoEZmel2K 1givz2x+xeX276eef2sOaIY8EFhmDJmYumIo3xNvMSgMQeXm09asSdYuZqxwof7IhCBdi3Q1798oI UMRxDlFiu7MQPLO88XGfYrAglj+Y6BENpK7ReOuGEhWhIOIlEWxt67QpcDnI8EiRdPBr4Smt54QCH Grcs2qFUrHLezsHvWz/GjKNUnCg7l+lcCAeWNSuubJk4DicaO9039eDuE7cVhDZ6YBOfHtBoj5mVH 14PWj0Rigm17k0awg+4exrP7Z3cfP87IwAFiCiuymv6y14p70Bc3T92IA7GHUClvZFpbvthA59RmC nIw+IsOKXC2xe9zJObrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLOQl-00ErrD-UI; Fri, 27 Jan 2023 13:06:13 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLNhk-00EV5j-21 for linux-arm-kernel@lists.infradead.org; Fri, 27 Jan 2023 12:19:43 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9E0ED2B; Fri, 27 Jan 2023 04:20:18 -0800 (PST) Received: from monolith.localdoman (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D43A3F5A1; Fri, 27 Jan 2023 04:19:33 -0800 (PST) Date: Fri, 27 Jan 2023 12:19:22 +0000 From: Alexandru Elisei To: Suzuki K Poulose Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Andrew Jones , Christoffer Dall , Fuad Tabba , Jean-Philippe Brucker , Joey Gouly , Marc Zyngier , Mark Rutland , Oliver Upton , Paolo Bonzini , Quentin Perret , Steven Price , Thomas Huth , Will Deacon , Zenghui Yu , linux-coco@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC kvmtool 04/31] Add --nocompat option to disable compat warnings Message-ID: References: <20230127112248.136810-1-suzuki.poulose@arm.com> <20230127113932.166089-1-suzuki.poulose@arm.com> <20230127113932.166089-5-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230127113932.166089-5-suzuki.poulose@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230127_041940_275069_14D273FA X-CRM114-Status: GOOD ( 26.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Fri, Jan 27, 2023 at 11:39:05AM +0000, Suzuki K Poulose wrote: > From: Alexandru Elisei > > Commit e66942073035 ("kvm tools: Guest kernel compatability") added the > functionality that enables devices to print a warning message if the device > hasn't been initialized by the time the VM is destroyed. The purpose of > these messages is to let the user know if the kernel hasn't been built with > the correct Kconfig options to take advantage of the said devices (all > using virtio). > > Since then, kvmtool has evolved and now supports loading different payloads > (like firmware images), and having those warnings even when it is entirely > intentional for the payload not to touch the devices can be confusing for > the user and makes the output unnecessarily verbose in those cases. > > Add the --nocompat option to disable the warnings; the warnings are still > enabled by default. I had a conversation with Will regarding this some time ago, we settled on a different approach, by using --loglevel=, similar to what Linux does. I'll put that on my TODO list and try to send patches soon-ish. Thanks, Alex > > Reported-by: Christoffer Dall > Signed-off-by: Alexandru Elisei > Signed-off-by: Suzuki K Poulose > --- > builtin-run.c | 5 ++++- > guest_compat.c | 1 + > include/kvm/kvm-config.h | 1 + > 3 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/builtin-run.c b/builtin-run.c > index bb7e6e8d..f8edfb3f 100644 > --- a/builtin-run.c > +++ b/builtin-run.c > @@ -183,6 +183,8 @@ static int mem_parser(const struct option *opt, const char *arg, int unset) > OPT_BOOLEAN('\0', "nodefaults", &(cfg)->nodefaults, "Disable" \ > " implicit configuration that cannot be" \ > " disabled otherwise"), \ > + OPT_BOOLEAN('\0', "nocompat", &(cfg)->nocompat, "Disable" \ > + " compat warnings"), \ > OPT_CALLBACK('\0', "9p", NULL, "dir_to_share,tag_name", \ > "Enable virtio 9p to share files between host and" \ > " guest", virtio_9p_rootdir_parser, kvm), \ > @@ -797,7 +799,8 @@ static int kvm_cmd_run_work(struct kvm *kvm) > > static void kvm_cmd_run_exit(struct kvm *kvm, int guest_ret) > { > - compat__print_all_messages(); > + if (!kvm->cfg.nocompat) > + compat__print_all_messages(); > > init_list__exit(kvm); > > diff --git a/guest_compat.c b/guest_compat.c > index fd4704b2..a413c12c 100644 > --- a/guest_compat.c > +++ b/guest_compat.c > @@ -88,6 +88,7 @@ int compat__print_all_messages(void) > > printf("\n # KVM compatibility warning.\n\t%s\n\t%s\n", > msg->title, msg->desc); > + printf("\tTo stop seeing this warning, use the --nocompat option.\n"); > > list_del(&msg->list); > compat__free(msg); > diff --git a/include/kvm/kvm-config.h b/include/kvm/kvm-config.h > index 368e6c7d..88df7cc2 100644 > --- a/include/kvm/kvm-config.h > +++ b/include/kvm/kvm-config.h > @@ -30,6 +30,7 @@ struct kvm_config { > u64 vsock_cid; > bool virtio_rng; > bool nodefaults; > + bool nocompat; > int active_console; > int debug_iodelay; > int nrcpus; > -- > 2.34.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel