linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v3 11/20] arm64: add PTE_UXN/PTE_WRITE to SWAPPER_*_FLAGS
       [not found] ` <20230511110337.3385517-12-joey.gouly@arm.com>
@ 2023-05-26  9:33   ` Catalin Marinas
  0 siblings, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2023-05-26  9:33 UTC (permalink / raw)
  To: Joey Gouly
  Cc: linux-arm-kernel, nd, broonie, james.morse, mark.rutland, maz,
	oliver.upton, shuah, suzuki.poulose, will, yuzenghui

On Thu, May 11, 2023 at 12:03:28PM +0100, Joey Gouly wrote:
> With PIE enabled, the swapper PTEs would have a Permission Indirection Index
> (PIIndex) of 0. A PIIndex of 0 is not currently used by any other PTEs.
> 
> To avoid using index 0 specifically for the swapper PTEs, mark them as
> PTE_UXN and PTE_WRITE, so that they map to a PAGE_KERNEL_EXEC equivalent.
> 
> This also adds PTE_WRITE to KPTI_NG_PTE_FLAGS, which was tested by booting
> with kpti=on.
> 
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>

It looks fine now.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 00/20] Permission Indirection Extension
       [not found] <20230511110337.3385517-1-joey.gouly@arm.com>
       [not found] ` <20230511110337.3385517-12-joey.gouly@arm.com>
@ 2023-06-01 12:02 ` Mark Brown
       [not found] ` <20230511110337.3385517-9-joey.gouly@arm.com>
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2023-06-01 12:02 UTC (permalink / raw)
  To: Joey Gouly
  Cc: linux-arm-kernel, nd, catalin.marinas, james.morse, mark.rutland,
	maz, oliver.upton, shuah, suzuki.poulose, will, yuzenghui


[-- Attachment #1.1: Type: text/plain, Size: 355 bytes --]

On Thu, May 11, 2023 at 12:03:17PM +0100, Joey Gouly wrote:
> Hi all,
> 
> This series implements the Permission Indirection Extension introduced in 2022
> VMSA enhancements [1].

I've been using this in my general development and in particular with my
GCS work and everything seems to be working so:

Tested-by: Mark Brown <broonie@kernel.org>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 08/20] KVM: arm64: Save/restore TCR2_EL1
       [not found] ` <20230511110337.3385517-9-joey.gouly@arm.com>
@ 2023-06-02 14:56   ` Catalin Marinas
  2023-06-03  8:34   ` Marc Zyngier
  1 sibling, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2023-06-02 14:56 UTC (permalink / raw)
  To: Joey Gouly
  Cc: linux-arm-kernel, nd, broonie, james.morse, mark.rutland, maz,
	oliver.upton, shuah, suzuki.poulose, will, yuzenghui

On Thu, May 11, 2023 at 12:03:25PM +0100, Joey Gouly wrote:
> Define the new system register TCR2_EL1 and context switch it.
> 
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Oliver Upton <oliver.upton@linux.dev>
> Cc: James Morse <james.morse@arm.com>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Zenghui Yu <yuzenghui@huawei.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

Marc, I think the comments you had previously on this patch have been
addressed (using reset_val now instead of reset_unknown).

When you get around, please ack so that I can queue it through the arm64
tree.

Thanks.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 09/20] KVM: arm64: Save/restore PIE registers
       [not found] ` <20230511110337.3385517-10-joey.gouly@arm.com>
@ 2023-06-02 14:57   ` Catalin Marinas
  2023-06-03  8:35   ` Marc Zyngier
  1 sibling, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2023-06-02 14:57 UTC (permalink / raw)
  To: Joey Gouly
  Cc: linux-arm-kernel, nd, broonie, james.morse, mark.rutland, maz,
	oliver.upton, shuah, suzuki.poulose, will, yuzenghui

On Thu, May 11, 2023 at 12:03:26PM +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 <joey.gouly@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Oliver Upton <oliver.upton@linux.dev>
> Cc: James Morse <james.morse@arm.com>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Zenghui Yu <yuzenghui@huawei.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
> ---
>  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 f2cfb9ef1eeb..d9f079fbdaf4 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -340,6 +340,10 @@ enum vcpu_sysreg {
>  	TFSR_EL1,	/* Tag Fault Status Register (EL1) */
>  	TFSRE0_EL1,	/* Tag Fault Status Register (EL0) */
>  
> +	/* Permission Indirection Extension registers */
> +	PIR_EL1,       /* Permission Indirection Register 1 (EL1) */
> +	PIRE0_EL1,     /*  Permission Indirection Register 0 (EL1) */

These have been moved outside of the *_EL2 range as Marc asked. It looks
fine to me, waiting for an Ack from Marc/Oliver.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 08/20] KVM: arm64: Save/restore TCR2_EL1
       [not found] ` <20230511110337.3385517-9-joey.gouly@arm.com>
  2023-06-02 14:56   ` [PATCH v3 08/20] KVM: arm64: Save/restore TCR2_EL1 Catalin Marinas
@ 2023-06-03  8:34   ` Marc Zyngier
  1 sibling, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2023-06-03  8:34 UTC (permalink / raw)
  To: Joey Gouly
  Cc: linux-arm-kernel, nd, broonie, catalin.marinas, james.morse,
	mark.rutland, oliver.upton, shuah, suzuki.poulose, will,
	yuzenghui

On Thu, 11 May 2023 12:03:25 +0100,
Joey Gouly <joey.gouly@arm.com> wrote:
> 
> Define the new system register TCR2_EL1 and context switch it.
> 
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Oliver Upton <oliver.upton@linux.dev>
> Cc: James Morse <james.morse@arm.com>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Zenghui Yu <yuzenghui@huawei.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

Reviewed-by: Marc Zyngier <maz@kernel.org>

	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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 09/20] KVM: arm64: Save/restore PIE registers
       [not found] ` <20230511110337.3385517-10-joey.gouly@arm.com>
  2023-06-02 14:57   ` [PATCH v3 09/20] KVM: arm64: Save/restore PIE registers Catalin Marinas
@ 2023-06-03  8:35   ` Marc Zyngier
  1 sibling, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2023-06-03  8:35 UTC (permalink / raw)
  To: Joey Gouly
  Cc: linux-arm-kernel, nd, broonie, catalin.marinas, james.morse,
	mark.rutland, oliver.upton, shuah, suzuki.poulose, will,
	yuzenghui

On Thu, 11 May 2023 12:03:26 +0100,
Joey Gouly <joey.gouly@arm.com> 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 <joey.gouly@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Oliver Upton <oliver.upton@linux.dev>
> Cc: James Morse <james.morse@arm.com>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Zenghui Yu <yuzenghui@huawei.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

Reviewed-by: Marc Zyngier <maz@kernel.org>

	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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 10/20] KVM: arm64: expose ID_AA64MMFR3_EL1 to guests
       [not found] ` <20230511110337.3385517-11-joey.gouly@arm.com>
@ 2023-06-03  8:35   ` Marc Zyngier
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2023-06-03  8:35 UTC (permalink / raw)
  To: Joey Gouly
  Cc: linux-arm-kernel, nd, broonie, catalin.marinas, james.morse,
	mark.rutland, oliver.upton, shuah, suzuki.poulose, will,
	yuzenghui

On Thu, 11 May 2023 12:03:27 +0100,
Joey Gouly <joey.gouly@arm.com> wrote:
> 
> Now that KVM context switches the appropriate registers, expose ID_AA64MMFR3_EL1
> to guests to allow them to use the new features.
> 
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Oliver Upton <oliver.upton@linux.dev>
> Cc: James Morse <james.morse@arm.com>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Zenghui Yu <yuzenghui@huawei.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>

Reviewed-by: Marc Zyngier <maz@kernel.org>

	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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 00/20] Permission Indirection Extension
       [not found] <20230511110337.3385517-1-joey.gouly@arm.com>
                   ` (4 preceding siblings ...)
       [not found] ` <20230511110337.3385517-11-joey.gouly@arm.com>
@ 2023-06-05 17:58 ` Catalin Marinas
  5 siblings, 0 replies; 8+ messages in thread
From: Catalin Marinas @ 2023-06-05 17:58 UTC (permalink / raw)
  To: Joey Gouly
  Cc: linux-arm-kernel, nd, broonie, james.morse, mark.rutland, maz,
	oliver.upton, shuah, suzuki.poulose, will, yuzenghui

On Thu, May 11, 2023 at 12:03:17PM +0100, Joey Gouly wrote:
> Joey Gouly (20):
>   arm64/sysreg: Add ID register ID_AA64MMFR3
>   arm64/sysreg: add system registers TCR2_ELx
>   arm64/sysreg: update HCRX_EL2 register
>   arm64/sysreg: add PIR*_ELx registers
>   arm64: cpufeature: add system register ID_AA64MMFR3
>   arm64: cpufeature: add TCR2 cpucap
>   arm64: cpufeature: add Permission Indirection Extension cpucap
>   KVM: arm64: Save/restore TCR2_EL1
>   KVM: arm64: Save/restore PIE registers
>   KVM: arm64: expose ID_AA64MMFR3_EL1 to guests
>   arm64: add PTE_UXN/PTE_WRITE to SWAPPER_*_FLAGS
>   arm64: add PTE_WRITE to PROT_SECT_NORMAL
>   arm64: reorganise PAGE_/PROT_ macros
>   arm64: disable EL2 traps for PIE
>   arm64: add encodings of PIRx_ELx registers
>   arm64: enable Permission Indirection Extension (PIE)
>   arm64: transfer permission indirection settings to EL2
>   arm64: Document boot requirements for PIE
>   KVM: selftests: get-reg-list: support ID register features
>   KVM: selftests: get-reg-list: add Permission Indirection registers

For some reason lore.kernel.org doesn't have this series, though it made
it to infradead (and this archive:
http://lists.openwrt.org/pipermail/linux-arm-kernel/2023-May/833014.html).

I applied it manually to the arm64 for-next/feat_s1pie (I don't have a
b4 automated reply for it).

Patch 14 conflicts with Kristina's series (for-next/feat_mops) and I
solved it in the merge resolution in for-next/core but this would get
lost when I redo the topic branch merges.

You might as well rebase this series on top of the arm64
for-next/feat_mops and repost so that we have the Link: tag as well.

Thanks.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-06-05 17:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230511110337.3385517-1-joey.gouly@arm.com>
     [not found] ` <20230511110337.3385517-12-joey.gouly@arm.com>
2023-05-26  9:33   ` [PATCH v3 11/20] arm64: add PTE_UXN/PTE_WRITE to SWAPPER_*_FLAGS Catalin Marinas
2023-06-01 12:02 ` [PATCH v3 00/20] Permission Indirection Extension Mark Brown
     [not found] ` <20230511110337.3385517-9-joey.gouly@arm.com>
2023-06-02 14:56   ` [PATCH v3 08/20] KVM: arm64: Save/restore TCR2_EL1 Catalin Marinas
2023-06-03  8:34   ` Marc Zyngier
     [not found] ` <20230511110337.3385517-10-joey.gouly@arm.com>
2023-06-02 14:57   ` [PATCH v3 09/20] KVM: arm64: Save/restore PIE registers Catalin Marinas
2023-06-03  8:35   ` Marc Zyngier
     [not found] ` <20230511110337.3385517-11-joey.gouly@arm.com>
2023-06-03  8:35   ` [PATCH v3 10/20] KVM: arm64: expose ID_AA64MMFR3_EL1 to guests Marc Zyngier
2023-06-05 17:58 ` [PATCH v3 00/20] Permission Indirection Extension Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).