Message ID | 20230306195438.1557851-3-ryan.roberts@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | KVM: arm64: Support FEAT_LPA2 at hyp s1 and vm s2 | expand |
On Mon, Mar 06, 2023 at 07:54:28PM +0000, Ryan Roberts wrote: > diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h > index 9e3ecba3c4e6..7f708eecc3ad 100644 > --- a/arch/arm64/include/asm/sysreg.h > +++ b/arch/arm64/include/asm/sysreg.h > @@ -609,10 +609,12 @@ > > /* id_aa64mmfr0 */ > #define ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MIN 0x0 > +#define ID_AA64MMFR0_EL1_TGRAN4_LPA2 ID_AA64MMFR0_EL1_TGRAN4_52_BIT > #define ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MAX 0x7 > #define ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED_MIN 0x0 > #define ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED_MAX 0x7 > #define ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MIN 0x1 > +#define ID_AA64MMFR0_EL1_TGRAN16_LPA2 ID_AA64MMFR0_EL1_TGRAN16_52_BIT > #define ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MAX 0xf This patch evolved a bit since I first acked it in Anshuman's series. I can't find any trace of ID_AA64MMFR0_EL1_TGRAN4_52_BIT in the kernel. Is it introduced in a later patch?
On 12/04/2023 17:27, Catalin Marinas wrote: > On Mon, Mar 06, 2023 at 07:54:28PM +0000, Ryan Roberts wrote: >> diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h >> index 9e3ecba3c4e6..7f708eecc3ad 100644 >> --- a/arch/arm64/include/asm/sysreg.h >> +++ b/arch/arm64/include/asm/sysreg.h >> @@ -609,10 +609,12 @@ >> >> /* id_aa64mmfr0 */ >> #define ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MIN 0x0 >> +#define ID_AA64MMFR0_EL1_TGRAN4_LPA2 ID_AA64MMFR0_EL1_TGRAN4_52_BIT >> #define ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MAX 0x7 >> #define ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED_MIN 0x0 >> #define ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED_MAX 0x7 >> #define ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MIN 0x1 >> +#define ID_AA64MMFR0_EL1_TGRAN16_LPA2 ID_AA64MMFR0_EL1_TGRAN16_52_BIT >> #define ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MAX 0xf > > This patch evolved a bit since I first acked it in Anshuman's series. I > can't find any trace of ID_AA64MMFR0_EL1_TGRAN4_52_BIT in the kernel. Is > it introduced in a later patch? > It's autogenerated as part of the sysreg magic. Ends up in arch/arm64/include/generated/asm/sysreg-defs.h.
On Thu, Apr 13, 2023 at 09:16:03AM +0100, Ryan Roberts wrote: > On 12/04/2023 17:27, Catalin Marinas wrote: > > On Mon, Mar 06, 2023 at 07:54:28PM +0000, Ryan Roberts wrote: > >> diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h > >> index 9e3ecba3c4e6..7f708eecc3ad 100644 > >> --- a/arch/arm64/include/asm/sysreg.h > >> +++ b/arch/arm64/include/asm/sysreg.h > >> @@ -609,10 +609,12 @@ > >> > >> /* id_aa64mmfr0 */ > >> #define ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MIN 0x0 > >> +#define ID_AA64MMFR0_EL1_TGRAN4_LPA2 ID_AA64MMFR0_EL1_TGRAN4_52_BIT > >> #define ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MAX 0x7 > >> #define ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED_MIN 0x0 > >> #define ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED_MAX 0x7 > >> #define ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MIN 0x1 > >> +#define ID_AA64MMFR0_EL1_TGRAN16_LPA2 ID_AA64MMFR0_EL1_TGRAN16_52_BIT > >> #define ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MAX 0xf > > > > This patch evolved a bit since I first acked it in Anshuman's series. I > > can't find any trace of ID_AA64MMFR0_EL1_TGRAN4_52_BIT in the kernel. Is > > it introduced in a later patch? > > It's autogenerated as part of the sysreg magic. Ends up in > arch/arm64/include/generated/asm/sysreg-defs.h. Ah, I keep forgetting this (I usually build the kernel in a different directory, so grep doesn't encounter it).
diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 9e3ecba3c4e6..7f708eecc3ad 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -609,10 +609,12 @@ /* id_aa64mmfr0 */ #define ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MIN 0x0 +#define ID_AA64MMFR0_EL1_TGRAN4_LPA2 ID_AA64MMFR0_EL1_TGRAN4_52_BIT #define ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MAX 0x7 #define ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED_MIN 0x0 #define ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED_MAX 0x7 #define ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MIN 0x1 +#define ID_AA64MMFR0_EL1_TGRAN16_LPA2 ID_AA64MMFR0_EL1_TGRAN16_52_BIT #define ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MAX 0xf #define ARM64_MIN_PARANGE_BITS 32 @@ -620,6 +622,7 @@ #define ID_AA64MMFR0_EL1_TGRAN_2_SUPPORTED_DEFAULT 0x0 #define ID_AA64MMFR0_EL1_TGRAN_2_SUPPORTED_NONE 0x1 #define ID_AA64MMFR0_EL1_TGRAN_2_SUPPORTED_MIN 0x2 +#define ID_AA64MMFR0_EL1_TGRAN_2_SUPPORTED_LPA2 0x3 #define ID_AA64MMFR0_EL1_TGRAN_2_SUPPORTED_MAX 0x7 #ifdef CONFIG_ARM64_PA_BITS_52 @@ -630,11 +633,13 @@ #if defined(CONFIG_ARM64_4K_PAGES) #define ID_AA64MMFR0_EL1_TGRAN_SHIFT ID_AA64MMFR0_EL1_TGRAN4_SHIFT +#define ID_AA64MMFR0_EL1_TGRAN_LPA2 ID_AA64MMFR0_EL1_TGRAN4_52_BIT #define ID_AA64MMFR0_EL1_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MIN #define ID_AA64MMFR0_EL1_TGRAN_SUPPORTED_MAX ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MAX #define ID_AA64MMFR0_EL1_TGRAN_2_SHIFT ID_AA64MMFR0_EL1_TGRAN4_2_SHIFT #elif defined(CONFIG_ARM64_16K_PAGES) #define ID_AA64MMFR0_EL1_TGRAN_SHIFT ID_AA64MMFR0_EL1_TGRAN16_SHIFT +#define ID_AA64MMFR0_EL1_TGRAN_LPA2 ID_AA64MMFR0_EL1_TGRAN16_52_BIT #define ID_AA64MMFR0_EL1_TGRAN_SUPPORTED_MIN ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MIN #define ID_AA64MMFR0_EL1_TGRAN_SUPPORTED_MAX ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MAX #define ID_AA64MMFR0_EL1_TGRAN_2_SHIFT ID_AA64MMFR0_EL1_TGRAN16_2_SHIFT