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 275F914A86 for ; Wed, 19 Jul 2023 15:20:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3255C433C8; Wed, 19 Jul 2023 15:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689780035; bh=cQet6Vt0jQOV5Knc5ydF2lhZL6NPJ407TEb5B3QrwcI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oaroyjGr5mldeJ/3/1xA31SWf6CkenbxNDpltemvoK2fomQspSiympmX762rrjejm oOx/EFZPxF6QemJtfj6Pdn9XsfH1rncwX78LOrkqqWV/ev/qBnptidDRMtsqNUIPGg 7opJKiKrJb3DM7J5+Do4ZpKQ77B/z96LiCXWlHciRKhy+OlOo7HEK80fufkWYSJ7BO uiS2sCj7lkCYtArJtK4x83g4V0UIbrdjkTZB5WKjXSEK/ka908ftvqQwqpV2sRi1Dn GAnh6OH1eFhwxXOxfBi04pRcGPnVs1dillgjjACcm7+ONbrLLdosqifyoNMgTtKKbO AvGPXeOAQrCFQ== 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 1qM8yf-00EPul-8Q; Wed, 19 Jul 2023 16:20:33 +0100 Date: Wed, 19 Jul 2023 16:20:33 +0100 Message-ID: <86v8egszb2.wl-maz@kernel.org> From: Marc Zyngier To: Fuad Tabba Cc: kvmarm@lists.linux.dev, oliver.upton@linux.dev, catalin.marinas@arm.com, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, will@kernel.org Subject: Re: [PATCH v1 0/5] Fix setting SVE and SME traps in (h)VHE In-Reply-To: <20230719150639.1968034-1-tabba@google.com> References: <20230719150639.1968034-1-tabba@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) 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: 185.219.108.64 X-SA-Exim-Rcpt-To: tabba@google.com, kvmarm@lists.linux.dev, oliver.upton@linux.dev, catalin.marinas@arm.com, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Hey Fuad, Many thanks for looking into this, much appreciated. A passing comment below. On Wed, 19 Jul 2023 16:06:34 +0100, Fuad Tabba wrote: > > The (re)setting and disabling of SVE/SME trap handling (mostly) > done for the hVHE work [*] misses a couple of cases. > > This patch series ensures that these traps are disabled on setup > and reset. Moreover, it makes the code consistent in using > CPACR_EL1 or CPTR_EL2, depending on the mode. To provide context, this last point isn't really a correctness issue. It only ensures that: - we don't need to issue a synchronisation when alternating one or the other accessor, - when running hVHE under NV, we don't trap unnecessarily on accessing CPTR_EL2, while CPACR_EL1 can be used directly without any trap. I'll have a look at the actual patches shortly. Thanks again, M. -- Without deviation from the norm, progress is not possible.