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 6B8B2C636CC for ; Mon, 13 Feb 2023 15:50:45 +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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5Io1VE48qXhbn5rAYEWCQJ2DPMKSkgrNHFsgn3q4mbs=; b=uE+XWUnntTW8dq n3NNYrj521ONHPi2gQ5flOi+ofP4bIdd95187p7YuFHosef10JnJckCcTGCHi1OmF2iWoxxgGYNk9 08aQ1YT8a7NTkYNfJoUelyULeqE46MAdxuJn2AYWfuuU3ZGyXCg959+yEQ6nF6/0mxzr8RCZUUdCL SuHqawMs1PQmZE2wla0WjojTS8Wpn0D5WEeAKiwATgz3JXHo/EDVjb46MwDPX6kRgbps6zw4UqSaz lwqfifTQa4ycn/im/4vpe6wR1i/p1wFjue1QJodUyPa/iM2aybkT3UbBrDLTg3rIxSYu5Uh5FgGK/ cjzobSdCwC+0qugmrVaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRb5F-00FJIg-3j; Mon, 13 Feb 2023 15:49:37 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRb5A-00FJGR-UQ for linux-arm-kernel@lists.infradead.org; Mon, 13 Feb 2023 15:49:34 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8414F61174; Mon, 13 Feb 2023 15:49:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6E98C433EF; Mon, 13 Feb 2023 15:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676303369; bh=L7fNlanw9eP2R00IhlrPcaTcJaSCXezZjOfyvgfonE8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bTUBa6Xag0VnAlO7JGHzVHSaWEAcL0qeRyPgaP5nBELSkhqH9Q+E55ttkUXBJMb29 Y4LIY0wcSv0waPrftG7Z3JZf3eSyS15uPX4g/wdoNSUdAY5O8b1mkyzo3jV8E/aFzM /Oro8kim9t4hdYvEAXQSDP6mXh7hOJ0LVAWG/lzIp37DmYZ9ptXO5ijHfbv+XbyoVb d/PUWG85R2GzgBI5RkSJqsdR/ZgRIHnZbJKa79oHP+EEC71+dwrQwJjWTyRAzhbxXK lwRHbmUuAnN4t5vGrls3iIb6rznxTOG38nDvdysSKQK8eBwTwSyHCMMPpZlMKTPVt1 dfgSO69jKEYTA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pRb55-00A0oW-JI; Mon, 13 Feb 2023 15:49:27 +0000 Date: Mon, 13 Feb 2023 15:49:27 +0000 Message-ID: <861qmtzhtk.wl-maz@kernel.org> From: Marc Zyngier To: Sean Christopherson Cc: Oliver Upton , James Morse , Suzuki K Poulose , kvmarm@lists.linux.dev, Akihiko Odaki , Zenghui Yu , Raghavendra Rao Ananta , linux-arm-kernel@lists.infradead.org, Salil Mehta Subject: Re: [RFC PATCH v2 1/6] KVM: arm64: Add a helper to check if a VM has ran once In-Reply-To: References: <20230211013759.3556016-1-oliver.upton@linux.dev> <20230211013759.3556016-2-oliver.upton@linux.dev> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: seanjc@google.com, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, kvmarm@lists.linux.dev, akihiko.odaki@daynix.com, yuzenghui@huawei.com, rananta@google.com, linux-arm-kernel@lists.infradead.org, salil.mehta@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230213_074933_354956_D9B8BB53 X-CRM114-Status: GOOD ( 22.83 ) 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 On Mon, 13 Feb 2023 15:36:52 +0000, Sean Christopherson wrote: > > On Sat, Feb 11, 2023, Oliver Upton wrote: > > The test_bit(...) pattern is quite a lot of keystrokes. Replace > > existing callsites with a helper. > > > > No functional change intended. > > > > Signed-off-by: Oliver Upton > > --- > > arch/arm64/include/asm/kvm_host.h | 3 +++ > > arch/arm64/kvm/pmu-emul.c | 4 ++-- > > 2 files changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h > > index 35a159d131b5..012e94bc9e4a 100644 > > --- a/arch/arm64/include/asm/kvm_host.h > > +++ b/arch/arm64/include/asm/kvm_host.h > > @@ -1019,6 +1019,9 @@ bool kvm_arm_vcpu_is_finalized(struct kvm_vcpu *vcpu); > > (system_supports_32bit_el0() && \ > > !static_branch_unlikely(&arm64_mismatched_32bit_el0)) > > > > +#define kvm_vm_has_ran_once(kvm) \ > > From the peanut gallery... > > The ONCE part of the flag+API is unnecessary and flawed from a pendatic point of > view, e.g. if a VM has ran twice... Well, what I really wanted was: kvm_vm_has_run_at_least_once_on_this_side_of_the_multiverse() > What about kvm_vm_has_run() to align with a similar proposed x86 API for individual > vCPUs[*], if either one ever gets moved to common code? I think the original wording is understood by the very people who mess with this code, most of whom are not even native English speakers. It may not be pretty to your eyes, but hey, I'm not pretty either. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel