Skip to content

Commit fdf8659

Browse files
Marc Zyngierwilldeacon
authored andcommitted
arm64: Add a capability for FEAT_ECV
Add a new capability to detect the Enhanced Counter Virtualization feature (FEAT_ECV). Reviewed-by: Oliver Upton <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 0e277fb commit fdf8659

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

arch/arm64/kernel/cpufeature.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,6 +1930,16 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
19301930
.sign = FTR_UNSIGNED,
19311931
.min_field_value = 1,
19321932
},
1933+
{
1934+
.desc = "Enhanced Counter Virtualization",
1935+
.capability = ARM64_HAS_ECV,
1936+
.type = ARM64_CPUCAP_SYSTEM_FEATURE,
1937+
.matches = has_cpuid_feature,
1938+
.sys_reg = SYS_ID_AA64MMFR0_EL1,
1939+
.field_pos = ID_AA64MMFR0_ECV_SHIFT,
1940+
.sign = FTR_UNSIGNED,
1941+
.min_field_value = 1,
1942+
},
19331943
#ifdef CONFIG_ARM64_PAN
19341944
{
19351945
.desc = "Privileged Access Never",

arch/arm64/tools/cpucaps

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ HAS_CRC32
1818
HAS_DCPODP
1919
HAS_DCPOP
2020
HAS_E0PD
21+
HAS_ECV
2122
HAS_EPAN
2223
HAS_GENERIC_AUTH
2324
HAS_GENERIC_AUTH_ARCH

0 commit comments

Comments
 (0)