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 BC544EA0 for ; Sat, 3 Jun 2023 08:39:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C829C433D2; Sat, 3 Jun 2023 08:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685781555; bh=5oyiVDfccpGv2hmK2deVVQ8wi3z4MiLKb2Ddfn8bqjo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uylY5JgTaGj66a0uUJEklgf8Ch5Vii+rG5gQRprkqtks3BQJaBDV2srGVMHb+sh6F kxqk6onpH0svDDxJ0PyD2fxtFbOdZJBySccFcwM0Dk0Ie0ooU3m3XeHz0WDJlvk8eT ZMSOVSXeBmuHCooHb5DhnHjgpbbWFDLToIknAGTYFKLybItJaaxcowAZmhfGmRKG4s GhWrNlC7sBHoJxx13V4xUeWPNsJtufS4Mwp3VarhI4j4SRqAcx9rfcRF519Hifghba yLKHzGgPsesA/R398L4ElZ0OWHTRV7KR/FSz5t2MTzhMyCdkzpLoCNoRsC5Bgi7rT+ /F7idz3u8X7Fg== Received: from [37.166.197.171] (helo=wait-a-minute.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 1q5Mn3-002WrG-2M; Sat, 03 Jun 2023 09:39:13 +0100 Date: Sat, 03 Jun 2023 09:39:11 +0100 Message-ID: <87wn0lndn4.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 v2 01/11] KVM: arm64: initialize HCRX_EL2 In-Reply-To: <20230509142235.3284028-2-kristina.martsenko@arm.com> References: <20230509142235.3284028-1-kristina.martsenko@arm.com> <20230509142235.3284028-2-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 (x86_64-pc-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: 37.166.197.171 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 On Tue, 09 May 2023 15:22:25 +0100, Kristina Martsenko wrote: > > ARMv8.7/9.2 adds a new hypervisor configuration register HCRX_EL2. > Initialize the register to a safe value (all fields 0), to be robust > against firmware that has not initialized it. This is also needed to > ensure that the register is reinitialized after a kexec by a future > kernel. > > In addition, move SMPME setup over to the new flags, as it would > otherwise get overridden. It is safe to set the bit even if SME is not > (uniformly) supported, as it will write to a RES0 bit (having no > effect), and SME will be disabled by the cpufeature framework. > (Similar to how e.g. the API bit is handled in HCR_HOST_NVHE_FLAGS.) > > Signed-off-by: Kristina Martsenko Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.