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 747AEC77B73 for ; Thu, 20 Apr 2023 08:37:33 +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=K3G4wnfuuaSMheYNAiPmCmNxpSQxT9hm3ee9mh6oLrA=; b=42PT7lIrOcJPZE n+nK9Mr2luJGh6SdHhAxHTakufFGu1WZGm+6sAX/ErpFV/vshak/hmI0zgMvoBjQpSFqDTFMRYp56 B9X7O/sw1aUgUgZyGi1lXZHG5EpUkQS4YwlQHL6tN8LDHNQOhKhcT5k6QOttPYo8lgtV/fA9k6Tak MxN6Wjc1SEKjvICi8tAHnLNrUFX8j9On8ytoC45dBvvatjbIJNXFMQC0dc1EU/IvEGbAhFg3G6BnR ZRkKmfAuxRWmuSeo1yfqh6zH1RGyRPaeI7jZxj3binlRh7sV2eWzRwz14ReR3ZHLKslFEUiOPhQ40 bPcY4Ph5nm+Nn/vMhJog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppPmT-007QU3-01; Thu, 20 Apr 2023 08:36:41 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppPmP-007QSX-15 for linux-arm-kernel@lists.infradead.org; Thu, 20 Apr 2023 08:36:38 +0000 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 8F3AB6460B; Thu, 20 Apr 2023 08:36:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDD89C4339C; Thu, 20 Apr 2023 08:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681979796; bh=ZuSf8Qquz2yZWu9oCSynAeenYodDiUYNfhLNE3yD19Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AWM4qb6GXnDYTbjuBkb+PuZvwwK6T73m+gkWD+MzRfD2wM75gqBbQmqNbRyOgJNnG h07Pn0rI+PzptY6342PpVbh8Gk2uOGMpNwchmXcVrrRrPbX2wnSZHnWuuTnhtSF4VD jqOghIv3aNrKeKiEnvq5tSXUaovaNNUNZbJvY9h0dlOGXBS5i88gMEYNvJ3drkUqdn +mkKcX8c/ADjWNW1Ttxw64m9Idhk+CkAO+hSDYG4MI3qPbDqFadWuoObuzfE+5UOod I7VcfUBvrsZkCabLvkkeIstWr5Ej3qZkXmnWAukmbVHR3EHKXeuJLouS6vtgBt6QJr y/38kTOoBPVqg== 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 1ppPmL-009nbX-Ta; Thu, 20 Apr 2023 09:36:34 +0100 Date: Thu, 20 Apr 2023 09:36:33 +0100 Message-ID: <86wn27j6ge.wl-maz@kernel.org> From: Marc Zyngier To: Joey Gouly Cc: , , , , , , , , , Subject: Re: [PATCH v2 09/19] KVM: arm64: Save/restore PIE registers In-Reply-To: <20230413110513.243326-10-joey.gouly@arm.com> References: <20230413110513.243326-1-joey.gouly@arm.com> <20230413110513.243326-10-joey.gouly@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 (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, linux-arm-kernel@lists.infradead.org, nd@arm.com, broonie@kernel.org, catalin.marinas@arm.com, james.morse@arm.com, mark.rutland@arm.com, oliver.upton@linux.dev, suzuki.poulose@arm.com, will@kernel.org, yuzenghui@huawei.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-20230420_013637_450038_224B19C5 X-CRM114-Status: GOOD ( 21.34 ) 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 Thu, 13 Apr 2023 12:05:03 +0100, Joey Gouly wrote: > > Define the new system registers that PIE introduces and context switch them. > The PIE feature is still hidden from the ID register, and not exposed to a VM. > > Signed-off-by: Joey Gouly > Cc: Marc Zyngier > Cc: Oliver Upton > Cc: James Morse > Cc: Suzuki K Poulose > Cc: Zenghui Yu > Cc: Catalin Marinas > Cc: Will Deacon > Reviewed-by: Catalin Marinas > --- > arch/arm64/include/asm/kvm_host.h | 4 ++++ > arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 8 ++++++++ > arch/arm64/kvm/sys_regs.c | 2 ++ > 3 files changed, 14 insertions(+) > > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h > index e1137832a01f..381bd0763abf 100644 > --- a/arch/arm64/include/asm/kvm_host.h > +++ b/arch/arm64/include/asm/kvm_host.h > @@ -367,6 +367,10 @@ enum vcpu_sysreg { > CNTHCTL_EL2, /* Counter-timer Hypervisor Control register */ > SP_EL2, /* EL2 Stack Pointer */ > > + /* Permission Indirection Extension registers */ > + PIR_EL1, /* Permission Indirection Register 1 (EL1) */ > + PIRE0_EL1, /* Permission Indirection Register 0 (EL1) */ > + nit: please move these EL1 register outside of the EL2 range, as it becomes significant with NV. Next to the MTE register is as good a place as any. 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