Re: [kvm-unit-tests PATCH 1/2] arm64: set sctlr_el1.SPAN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Jun 16, 2023, at 6:31 PM, Nadav Amit <nadav.amit@xxxxxxxxx> wrote:
> 
> From: Nadav Amit <namit@xxxxxxxxxx>
> 
> Do not assume PAN is not supported or that sctlr_el1.SPAN is already set.
> 
> Without setting sctlr_el1.SPAN, tests crash when they access the memory
> after an exception.
> 
> Signed-off-by: Nadav Amit <namit@xxxxxxxxxx>
> ---
> arm/cstart64.S         | 1 +
> lib/arm64/asm/sysreg.h | 1 +
> 2 files changed, 2 insertions(+)
> 
> diff --git a/arm/cstart64.S b/arm/cstart64.S
> index 61e27d3..d4cee6f 100644
> --- a/arm/cstart64.S
> +++ b/arm/cstart64.S
> @@ -245,6 +245,7 @@ asm_mmu_enable:
> 	orr	x1, x1, SCTLR_EL1_C
> 	orr	x1, x1, SCTLR_EL1_I
> 	orr	x1, x1, SCTLR_EL1_M
> +	orr	x1, x1, SCTLR_EL1_SPAN
> 	msr	sctlr_el1, x1
> 	isb
> 
> diff --git a/lib/arm64/asm/sysreg.h b/lib/arm64/asm/sysreg.h
> index 18c4ed3..b9868ff 100644
> --- a/lib/arm64/asm/sysreg.h
> +++ b/lib/arm64/asm/sysreg.h
> @@ -81,6 +81,7 @@ asm(
> 
> /* System Control Register (SCTLR_EL1) bits */
> #define SCTLR_EL1_EE	(1 << 25)
> +#define SCTLR_EL1_SPAN	(1 << 23)
> #define SCTLR_EL1_WXN	(1 << 19)
> #define SCTLR_EL1_I	(1 << 12)
> #define SCTLR_EL1_SA0	(1 << 4)
> -- 
> 2.34.1
> 

Ping? (this one specifically is an issue)



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux