From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E0708F5F for ; 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) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII 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 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.