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 D49AE6A339; Tue, 20 Feb 2024 13:41:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708436478; cv=none; b=KAXvaPuP3bqEmjNClO4QHufeh+wHqfFv0vXr7TMXNrT2Fc+hKvA8FhJVakB75T8VOZ8I/EGuy9JvXC+jXTrqobt8aGT4ohbHPyBvxxBIgF+8Lwbi44sBWv/DZ3VcRx9MDaGNk6Dbo7s3Lq5v/Jq6nk5A9cHQtn4XboapiZ3E8tE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708436478; c=relaxed/simple; bh=+Le9jOeWGGyC43vashfPZPJjhioL9TzLhUbZ0z/BMxo=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=EFg2hIPzQZ6dLgNbupepm0ZmKWYQW/JmmRRr2OsRQd4uMK5tkg/XmC9iXmT5gMn2GYnETPJe9BcKfThqN/EYQ/Sb+cu7QsqTzVZr+w+nsYzokAEHuluVxaLWuOLtPNsKTY2ogqC2DvKwVB9yn9VOYkPaXwWOMMY3GESPQ8mAYUk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PKbIZm94; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PKbIZm94" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5809DC433C7; Tue, 20 Feb 2024 13:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708436478; bh=+Le9jOeWGGyC43vashfPZPJjhioL9TzLhUbZ0z/BMxo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PKbIZm94kMysi2iNMjcjkFcoGQs2vEdPS6OA7Hu/n0SOEHb1RHEouK1HSbcbZt76g P5cIvU2+nPAI2lHcivTLVb6COkzbG+XxQ7+cUWuhs4zrY1ci7g1+7907RJxPBMsTkD ubfVO5Eo4RN6+frTOhTAAQDfb2mnPkqDPPHYYJFS+BBGNmvviBbExNAicnOX2RpqF9 gsVrtRMddA3wT8KkL2xoHiWcH3lKr/FjObX0YqwTd/BTJioPnazQuBT2XpC/VRsFqx BsOrrH+Gy/FcmbxVi8rLX1ZXtqHMN4b6c0x8HnW4kVEFIOL7cYJCoShivJm+e6ghyS xYb+NcshGzJIA== 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 1rcQN1-004vy2-OM; Tue, 20 Feb 2024 13:41:16 +0000 Date: Tue, 20 Feb 2024 13:41:15 +0000 Message-ID: <86zfvv2qys.wl-maz@kernel.org> From: Marc Zyngier To: Joey Gouly Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Will Deacon , Catalin Marinas Subject: Re: [PATCH 02/13] KVM: arm64: Clarify ESR_ELx_ERET_ISS_ERET* In-Reply-To: <20240220132350.GB8575@e124191.cambridge.arm.com> References: <20240219092014.783809-1-maz@kernel.org> <20240219092014.783809-3-maz@kernel.org> <20240220113127.GB16168@e124191.cambridge.arm.com> <861q9748ut.wl-maz@kernel.org> <20240220132350.GB8575@e124191.cambridge.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/29.1 (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: joey.gouly@arm.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, will@kernel.org, catalin.marinas@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 20 Feb 2024 13:23:50 +0000, Joey Gouly wrote: > > On Tue, Feb 20, 2024 at 12:29:30PM +0000, Marc Zyngier wrote: > > On Tue, 20 Feb 2024 11:31:27 +0000, > > Joey Gouly wrote: > > > > > > If this part is confusing due to the name, maybe introduce a function in esr.h > > > esr_is_pac_eret() (name pending bikeshedding)? > > > > That's indeed a better option. Now for the bikeshed aspect: > > > > - esr_iss_is_eretax(): check for ESR_ELx_ERET_ISS_ERET being set > > > > - esr_iss_is_eretab(): check for ESR_ELx_ERET_ISS_ERETA being set > > > > Thoughts? > > > > I was trying to avoid the ERETA* confusion by suggesting 'pac_eret', but if I > were to pick between your options I'd pick esr_iss_is_eretax(). It's not an either/or situation. We actually need both: - esr_iss_is_eretax() being true tells you that you need to authenticate the ERET - esr_iss_is_eretab() tells you that you need to use the A or B key Thanks, M. -- Without deviation from the norm, progress is not possible. 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 BE5B8C48BC3 for ; Tue, 20 Feb 2024 13:41:36 +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=msUZsqq0iurMWtwuNOsI2BNyKRaMGOMBHeJocmZ197M=; b=lAJv16fecP1oGI fviA68igjl0JRBK51t0oE42W+iU9iL6JDzNuwrCvUdgnt4h71lzIE/7RvO8f12LBl3QqjHCH/FRew oQmjYkfo6h62ZLpBn5DTHdNck23V7os7JwJqgdDxpBPCeDBfJt37L3mNeESXXf6iBw8scJ9yeOwpe 4wbKZq7I7z7XXikNUN7M17CNTcXLUxliiym/mF52zz7LBTX+eLqZAlTr96XXCtGjKjpErove+5YLm TpNlUQSoI3rhLPjS8feXGY4OksH2vHfeL3obicZ3FY3cJM5wsKR2ArIUv4bjIayujUEQh3QMOPpMt YOKdoaA6llyEPa/IXsyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcQNA-0000000Ex7D-2n8t; Tue, 20 Feb 2024 13:41:24 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcQN5-0000000Ex3V-14S2 for linux-arm-kernel@lists.infradead.org; Tue, 20 Feb 2024 13:41:21 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id ABEAD61073; Tue, 20 Feb 2024 13:41:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5809DC433C7; Tue, 20 Feb 2024 13:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708436478; bh=+Le9jOeWGGyC43vashfPZPJjhioL9TzLhUbZ0z/BMxo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PKbIZm94kMysi2iNMjcjkFcoGQs2vEdPS6OA7Hu/n0SOEHb1RHEouK1HSbcbZt76g P5cIvU2+nPAI2lHcivTLVb6COkzbG+XxQ7+cUWuhs4zrY1ci7g1+7907RJxPBMsTkD ubfVO5Eo4RN6+frTOhTAAQDfb2mnPkqDPPHYYJFS+BBGNmvviBbExNAicnOX2RpqF9 gsVrtRMddA3wT8KkL2xoHiWcH3lKr/FjObX0YqwTd/BTJioPnazQuBT2XpC/VRsFqx BsOrrH+Gy/FcmbxVi8rLX1ZXtqHMN4b6c0x8HnW4kVEFIOL7cYJCoShivJm+e6ghyS xYb+NcshGzJIA== 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 1rcQN1-004vy2-OM; Tue, 20 Feb 2024 13:41:16 +0000 Date: Tue, 20 Feb 2024 13:41:15 +0000 Message-ID: <86zfvv2qys.wl-maz@kernel.org> From: Marc Zyngier To: Joey Gouly Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Will Deacon , Catalin Marinas Subject: Re: [PATCH 02/13] KVM: arm64: Clarify ESR_ELx_ERET_ISS_ERET* In-Reply-To: <20240220132350.GB8575@e124191.cambridge.arm.com> References: <20240219092014.783809-1-maz@kernel.org> <20240219092014.783809-3-maz@kernel.org> <20240220113127.GB16168@e124191.cambridge.arm.com> <861q9748ut.wl-maz@kernel.org> <20240220132350.GB8575@e124191.cambridge.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/29.1 (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: joey.gouly@arm.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, will@kernel.org, catalin.marinas@arm.com 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-20240220_054119_431935_3DC9D05D X-CRM114-Status: GOOD ( 18.07 ) 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 Tue, 20 Feb 2024 13:23:50 +0000, Joey Gouly wrote: > > On Tue, Feb 20, 2024 at 12:29:30PM +0000, Marc Zyngier wrote: > > On Tue, 20 Feb 2024 11:31:27 +0000, > > Joey Gouly wrote: > > > > > > If this part is confusing due to the name, maybe introduce a function in esr.h > > > esr_is_pac_eret() (name pending bikeshedding)? > > > > That's indeed a better option. Now for the bikeshed aspect: > > > > - esr_iss_is_eretax(): check for ESR_ELx_ERET_ISS_ERET being set > > > > - esr_iss_is_eretab(): check for ESR_ELx_ERET_ISS_ERETA being set > > > > Thoughts? > > > > I was trying to avoid the ERETA* confusion by suggesting 'pac_eret', but if I > were to pick between your options I'd pick esr_iss_is_eretax(). It's not an either/or situation. We actually need both: - esr_iss_is_eretax() being true tells you that you need to authenticate the ERET - esr_iss_is_eretab() tells you that you need to use the A or B key 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