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 03353C43334 for ; Wed, 15 Jun 2022 13:25:06 +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=5NBrhqpslBK6AjBJfBUnun7TdDIbjCkGcQulgORIAP4=; b=fibcfUuSNWuzj4 HsZ4rvifTN3bgIYGO0pB1wL8DQ6CC9NciWexbkq8lS77ZZyZ+7ZCVFHGLrjnlZ8iz1g3YFkB8mj3J Gp0kOqUc6uMOxphdoRDYIZRdi5jDsX0CvecbBFOYG9gWmo7psuHISJv8XceHgMiGP9xcjD/hNfv6T bqUbzAIxKL2PfC3qanQL+VzYIkwbW4nYXXHWnIQyYHJizdbZwqSOlGijyQkwinb5hxNGHob2pGyDj 6FF+AHoEq8+APNt9sGwY4I/8CQzpJb4bnqXTeQDbCAt54FG4aiupbKPU8HKxMHo+MwOBYk5Jwrm4p W6/IUzXJS39TiY+lqSSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1T03-00EgEV-9m; Wed, 15 Jun 2022 13:23:59 +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 1o1Szx-00EgDE-7m for linux-arm-kernel@lists.infradead.org; Wed, 15 Jun 2022 13:23:57 +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 961BB61A8E; Wed, 15 Jun 2022 13:23:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1193C34115; Wed, 15 Jun 2022 13:23:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655299432; bh=Me0HdzSNXhl2tFgsUu9WBEDTzqpzKof+IK8Pccxqen0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Xb1tjiPm1Y3YyCDXPBYi3jWZ2ZV+5aeGLFzJ6kYuxjpP7h/4m9WB1W6ltukibQgEx NByyYYXIBxzu3kj4Rl/fBBj/OzCb2xkuCfnEORCyGxwgPnlVdrmIJy5F/U56yjTj1Z gpiMSYOOfPBjnMZ/nB9z41AMccyjw6in0d8dIWJ2/urByuj25T5f4DEiHEByj6kse5 mkM4k81dy5vyD9HKrL8G9BWsLpU36A8sRg83SO3QlRWXKPNP6Zqlr+8TufRCtOml0t B7ZeQbfj+p/PXk5ZLRLWW4w4m2Q9fHHSSg7yjgfqFsmV1dzbcc53pnXvtydrC9O1jK 9Z8t0RbjrmuhA== 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.95) (envelope-from ) id 1o1Szt-000nMF-Nk; Wed, 15 Jun 2022 14:23:49 +0100 Date: Wed, 15 Jun 2022 14:23:49 +0100 Message-ID: <87zgie2h7e.wl-maz@kernel.org> From: Marc Zyngier To: Alexandru Elisei Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Oliver Upton , Will Deacon , Fuad Tabba , Quentin Perret , Mark Brown , Reiji Watanabe , kernel-team@android.com Subject: Re: [PATCH v2 11/19] KVM: arm64: Move vcpu ON_UNSUPPORTED_CPU flag to the state flag set In-Reply-To: References: <20220610092838.1205755-1-maz@kernel.org> <20220610092838.1205755-12-maz@kernel.org> 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") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: alexandru.elisei@arm.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, oupton@google.com, will@kernel.org, tabba@google.com, qperret@google.com, broonie@kernel.org, reijiw@google.com, kernel-team@android.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-20220615_062353_792332_BE72A5F9 X-CRM114-Status: GOOD ( 29.88 ) 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 Wed, 15 Jun 2022 14:14:19 +0100, Alexandru Elisei wrote: > > Hi, > > On Fri, Jun 10, 2022 at 10:28:30AM +0100, Marc Zyngier wrote: > > The ON_UNSUPPORTED_CPU flag is only there to track the sad fact > > that we have ended-up on a CPU where we cannot really run. > > > > Since this is only for the host kernel's use, move it to the state > > set. > > > > Reviewed-by: Fuad Tabba > > Signed-off-by: Marc Zyngier > > --- > > arch/arm64/include/asm/kvm_host.h | 9 +++++---- > > 1 file changed, 5 insertions(+), 4 deletions(-) > > > > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h > > index 4f147bdc5ce9..0c22514cb7c7 100644 > > --- a/arch/arm64/include/asm/kvm_host.h > > +++ b/arch/arm64/include/asm/kvm_host.h > > @@ -519,6 +519,8 @@ struct kvm_vcpu_arch { > > #define HOST_SVE_ENABLED __vcpu_single_flag(sflags, BIT(0)) > > /* SME enabled for EL0 */ > > #define HOST_SME_ENABLED __vcpu_single_flag(sflags, BIT(1)) > > +/* Physical CPU not in supported_cpus */ > > +#define ON_UNSUPPORTED_CPU __vcpu_single_flag(sflags, BIT(2)) > > I'm a bit confused here. The ON_UNSUPPORTED_CPU flag ends up in sflags. The > comment for sflags says: > > + /* State flags for kernel bookkeeping, unused by the hypervisor code */ > + u64 sflags; > > The ON_UNSUPPORT_CPU flag is used exclusively by KVM (it's only used by the > file arch/arm64/kvm/arm.c), so why is it part of a set of flags which are > supposed to be unused by the hypervisor code? Are we going to have the same terminology discussion we had when you reviewed the NV patches? These flags are only used by code that isn't involved in any sort of world switching. If you are running nVHE, these flags are not used by the EL2 code. That's what 'hypervisor code' means in this context. 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