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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8603C433EF for ; Mon, 22 Nov 2021 16:27:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240233AbhKVQa0 (ORCPT ); Mon, 22 Nov 2021 11:30:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:40030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233901AbhKVQaY (ORCPT ); Mon, 22 Nov 2021 11:30:24 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E5249608FB; Mon, 22 Nov 2021 16:27:17 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mpC9z-0075rm-Mz; Mon, 22 Nov 2021 16:27:15 +0000 Date: Mon, 22 Nov 2021 16:27:15 +0000 Message-ID: <87zgpwcg0s.wl-maz@kernel.org> From: Marc Zyngier To: Raghavendra Rao Ananta Cc: Andrew Jones , James Morse , Alexandru Elisei , Suzuki K Poulose , Paolo Bonzini , Catalin Marinas , Will Deacon , Peter Shier , Ricardo Koller , Oliver Upton , Reiji Watanabe , Jing Zhang , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [RFC PATCH v2 02/11] KVM: Introduce kvm_vcpu_has_run_once In-Reply-To: <20211113012234.1443009-3-rananta@google.com> References: <20211113012234.1443009-1-rananta@google.com> <20211113012234.1443009-3-rananta@google.com> 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/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) 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: rananta@google.com, drjones@redhat.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, pbonzini@redhat.com, catalin.marinas@arm.com, will@kernel.org, pshier@google.com, ricarkol@google.com, oupton@google.com, reijiw@google.com, jingzhangos@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 13 Nov 2021 01:22:25 +0000, Raghavendra Rao Ananta wrote: > > Architectures such as arm64 and riscv uses vcpu variables > such as has_run_once and ran_atleast_once, respectively, > to mark if the vCPU has started running. Since these are > architecture agnostic variables, introduce > kvm_vcpu_has_run_once() as a core kvm functionality and > use this instead of the architecture defined variables. > > No functional change intended. > > Signed-off-by: Raghavendra Rao Ananta arm64 is moving away from this, see [1]. You also don't need any new state, as vcpu->pid gives you exactly what you need. Happy to queue additional patches on top if you want to deal with riscv. Thanks, M. [1] https://lore.kernel.org/all/20211018211158.3050779-1-maz@kernel.org/ -- Without deviation from the norm, progress is not possible.