]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: Add FEAT_FGT2 capability
authorMarc Zyngier <maz@kernel.org>
Tue, 22 Apr 2025 18:23:41 +0000 (19:23 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 6 May 2025 16:35:09 +0000 (17:35 +0100)
As we will eventually have to context-switch the FEAT_FGT2 registers
in KVM (something that has been completely ignored so far), add
a new cap that we will be able to check for.

Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kernel/cpufeature.c
arch/arm64/tools/cpucaps

index 9c4d6d552b25cb3a31d1fb267bd73d3f82513e69..bb6058c7d144c19eea5ba404a6e94439de9f92a9 100644 (file)
@@ -2876,6 +2876,13 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
                .matches = has_cpuid_feature,
                ARM64_CPUID_FIELDS(ID_AA64MMFR0_EL1, FGT, IMP)
        },
+       {
+               .desc = "Fine Grained Traps 2",
+               .type = ARM64_CPUCAP_SYSTEM_FEATURE,
+               .capability = ARM64_HAS_FGT2,
+               .matches = has_cpuid_feature,
+               ARM64_CPUID_FIELDS(ID_AA64MMFR0_EL1, FGT, FGT2)
+       },
 #ifdef CONFIG_ARM64_SME
        {
                .desc = "Scalable Matrix Extension",
index 772c1b008e437ed34cedb1c0f663c4dcea8f6759..39b154d2198fb655e0e8b43b6d835072309ff33b 100644 (file)
@@ -28,6 +28,7 @@ HAS_EPAN
 HAS_EVT
 HAS_FPMR
 HAS_FGT
+HAS_FGT2
 HAS_FPSIMD
 HAS_GCS
 HAS_GENERIC_AUTH