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 07F53C636CC for ; Thu, 16 Feb 2023 16:37:00 +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=qli3cHJE2ZmQ9txmicG4h8GIw9GX6P6EeLRQUhtSWWY=; b=l0xUEOH6BP65Fa frsKtmwWk/LrCeJVAtwfFhJf4g2JPVkzsBz1tUcgNBEnXvYTq2ZBjQVuV085Gj/Rx8Q3/FesJ0g0p 5uiLHD4B3ee6JN0x7irpUHeC1lSpq0DunrmWDv5ygUxIYxx6YtqNnLigVqdCnDdsJS8fB0OY4eZ6L BMUMD9Hd7W6clDpmkKZUClHknsyZRouhaYsORZVWRnz/UxuV2sdQE9lwEzSSQntymhKrHHdk70ea3 mlXQb5cKuzb3dHNI9Fw2YN4wZ4eqjevuxrhHsMFRezKou+eohAoJxp68NTQq6CmuWmTkQFYb2MkT8 S7wIHzFQe34OK9ys3q3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pShEi-00BDEM-2r; Thu, 16 Feb 2023 16:35:56 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pShEf-00BDDk-FK for linux-arm-kernel@lists.infradead.org; Thu, 16 Feb 2023 16:35:54 +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 E364B6203F; Thu, 16 Feb 2023 16:35:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47307C4339C; Thu, 16 Feb 2023 16:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676565352; bh=Qxa1eIcx4irxEB4fjy/cbkmrThFmrL93q4MPJFK62FY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Wn1sMiOTS08/gBE+cnuh+Ca6SyjESr537QA9m1OwMVbGZ6/Cek5ujv21tUiN8V8sb v6ZaXU418adcTr6+lDVNhZsWgPBYW/RpYST07IN2XB52pK459RhKCeXZzv/MgOUZW2 fR2bYWofeymC1W9RH4FS6/ORBjrGYpdDHC2KwDAKgfs5VTIqxzOzI3lu5hWibNwyP9 C6seZT8iM4m8sZAbviqqb0WlQRWn2Ly0l7Dxov6zfjoYumKFPZri3HOqy79lE/PQI7 CwvtDRU4VepEZ3L3bJub3OR6BKv/PUGBAa22r9u05Iz8BxRMdWoX4reeFow08vN6k3 +pet1O+sNaZ8A== 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 1pShEb-00AxpV-R5; Thu, 16 Feb 2023 16:35:49 +0000 Date: Thu, 16 Feb 2023 16:35:49 +0000 Message-ID: <86o7pty3dm.wl-maz@kernel.org> From: Marc Zyngier To: Kristina Martsenko Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, Catalin Marinas , Will Deacon , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Mark Rutland , Mark Brown , Luis Machado , Vladimir Murzin , linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/10] KVM: arm64: switch HCRX_EL2 between host and guest In-Reply-To: <20230216160012.272345-4-kristina.martsenko@arm.com> References: <20230216160012.272345-1-kristina.martsenko@arm.com> <20230216160012.272345-4-kristina.martsenko@arm.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/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: kristina.martsenko@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, mark.rutland@arm.com, broonie@kernel.org, luis.machado@arm.com, vladimir.murzin@arm.com, linux-kernel@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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_083553_611466_87D4B2AC X-CRM114-Status: GOOD ( 23.49 ) 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 Thu, 16 Feb 2023 16:00:05 +0000, Kristina Martsenko wrote: > > Switch the HCRX_EL2 register between host and guest configurations, in > order to enable different features in the host and guest. > > Note that the guest flags are only set if all CPUs have HCRX_EL2. > Asymmetric systems where only some CPUs have HCRX_EL2 are not supported > and will result in guests running with the host flags set (and a "SANITY > CHECK" warning printed for the host). > > After this change, SMPME is no longer set for guests, which should have > no effect as SME is currently disabled for guests. Why not preserve the behaviour by propagating the flag into the guest setup? > > Signed-off-by: Kristina Martsenko > --- > > I wasn't sure what to do about asymmetric systems. It seems a bit > fragile, maybe someone has a better idea? I would simply prevent these CPUs from booting if they come after a primary CPU that has the feature. These hypothetical asymmetric setups put a huge complexity on the kernel, and I'm worried that we're just giving implementers too much freedom. If someone comes up with that sort of stuff, they can write the patches themselves... Or do you know of any braindead setup involving an asymmetric FEAT_HCX implementation? Thanks, 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