Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3269231rwd; Sat, 3 Jun 2023 01:56:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ42248q+J0YCFF07KQD6zhr+SJZ9oB147alLhrUB7pmzgLoj0s6czBPpIZ1/fBS5wT5+YDh X-Received: by 2002:a17:90a:ee92:b0:255:38ed:9dcd with SMTP id i18-20020a17090aee9200b0025538ed9dcdmr2483040pjz.0.1685782611455; Sat, 03 Jun 2023 01:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685782611; cv=none; d=google.com; s=arc-20160816; b=qqbvQiwrWgaDSwlJne/7vfHuZeknOaSeWmefCd9nPM4zQavSyoPqDgYQrhIZHBS6+S Fr7BkV6irVKPQGzoHPJPrPIn1oBLJpVojRsPteRimqxA4qrU1MFA0fyHH/9U+nIZVyFx //ISuPATf4LkzAn0JG1MNERn0Wpng3Mi9P0h2K3yGcLrB4HEUbs6zIsOuYzOzY/R+6si qm/LHOLuq/9dD+QLipO9b6ID45hB8mIkDPB6MQB7MGxYrZWEo4xpdO3yjx6fPHT4bPgw DSFEbIgh1Vyfz2ZOJwK+ETcfAYtmO1mc32UMcc5fYXL/t8VY8l9dbjN0jmCN+9n+3xuK hL7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=afsBIOElUckW4ccSwl1+TzWLCeRnmU2PLODE2F0HwfE=; b=fP9JvVbNqZhtspjaFHaDI7i6mGPULpXfNuV5t4TvoXUKy3H9n4Yl7xU3ZBm69O3HPF svyr4QHQLa02QHNSrKi6DzkXxaT2P1ur3MGbz8rQAwrBJSbwTg5Zh0MOgHedoLyfHS0o vFqU6Z7i7E64nPuNLsymmPzpEjMls6YPWwkR3KZpo0OC31KdV+vDEuM/J7nYuUViZi7s nIr+eblN2HUfITic0CKkiHPMQaaO27QcmDcN3a4JLpYJRrCzIcB1pO8XrRaXw5PqnHo8 7/lzMS4aoMAfQgZwU3IlCM9ke61z38+y0zyMAg0oB0xFDPy/3qTFCx8U1tzFFfRY+VMW EOQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uylY5JgT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp9-20020a17090b4a8900b002567b8017fdsi2480481pjb.40.2023.06.03.01.56.36; Sat, 03 Jun 2023 01:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uylY5JgT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229881AbjFCIjS (ORCPT + 99 others); Sat, 3 Jun 2023 04:39:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbjFCIjR (ORCPT ); Sat, 3 Jun 2023 04:39:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F31F180 for ; Sat, 3 Jun 2023 01:39:16 -0700 (PDT) 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 E4A6960ACD 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) 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 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.