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 A4CDEC636CD for ; Wed, 1 Feb 2023 14:48:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbjBAOsU (ORCPT ); Wed, 1 Feb 2023 09:48:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232603AbjBAOsN (ORCPT ); Wed, 1 Feb 2023 09:48:13 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98BFA83ED for ; Wed, 1 Feb 2023 06:48:07 -0800 (PST) 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 2D93F617BB for ; Wed, 1 Feb 2023 14:48:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89F93C433D2; Wed, 1 Feb 2023 14:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675262886; bh=xGvT27UOv6KHtrcR/HehsfwzguP7agoCswmbPggIS9s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oT0w9aj3TAYtsWh2b5ymS6TJwqIS108GR/FU7Wpsmrt4VJbPLGhRM2PmBWi91OJn0 OrdaMFxPsim+CVc7BxIYKm/HS+px//Zh9zkn0oM02rvuWoNUJWh1GM6ri5AL0/QpVF Nxvvb/X1Ii5e6x425CvJfMz3iyO2Sv3GmbV9Ywm/IN7sGNYudHdIJYsCBzZ8uye9JJ RM54qQloqcurXAc17rUVY/O0TmYMf7RzQbEtUTW93JLtlf0iAuP/1S00LbDQ3K4tB/ e3TCe3pZ97oxGMm6L+H3lzBcJd9s3e7PK4epmjG8WgV4EIAFzAFLjyTeEJSvgFKGQK NAnkN6IhIZZ5Q== 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 1pNEP6-006Xdo-5A; Wed, 01 Feb 2023 14:48:04 +0000 Date: Wed, 01 Feb 2023 14:48:03 +0000 Message-ID: <86bkmd1ly4.wl-maz@kernel.org> From: Marc Zyngier To: Quentin Perret Cc: Catalin Marinas , Will Deacon , James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, kernel-team@android.com Subject: Re: [PATCH 0/4] KVM: arm64: Fix CPU resume/on with pKVM In-Reply-To: <20230201103755.1398086-1-qperret@google.com> References: <20230201103755.1398086-1-qperret@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/28.2 (aarch64-unknown-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: qperret@google.com, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 01 Feb 2023 10:37:50 +0000, Quentin Perret wrote: > > When using pKVM, we do not reset the EL2 exception vectors back to the > stubs for e.g. Power Management or CPU hotplug as we normally do in KVM. > As consequence, the initialisation perfomed by __finalise_el2 is missing > on e.g. the CPU_RESUME path with pKVM, hence leaving certain registers > in an incorrect state. > > One such example is ZCR_EL2 which remains configured with SVE traps > enabled. And so using SVE on a CPU that has gone through a hotplug > off/on cycle leads to a hyp panic. Not good. > > This series fixes this by macroizing the first half of __finalise_el2 > (that is, the part that is not specific to VHE) to allow its re-use > from pKVM's PSCI relay. For the series: Reviewed-by: Marc Zyngier I think it might be a bit late to send this as fixes for 6.2 (my latest pull request for kvmarm-fixes-6.2-3 is still in limbo), so I'd suggest we take it for 6.3. How do you want to deal with the backports? None of the patches have a Cc: stable, and only the last one has a Fixes: tag, but cannot be applied standalone. Thanks, M. -- Without deviation from the norm, progress is not possible.