mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
arm64: Add HAS_ECV_CNTPOFF capability
Add the probing code for the FEAT_ECV variant that implements CNTPOFF_EL2. Why it is optional is a mystery, but let's try and detect it. Reviewed-by: Reiji Watanabe <reijiw@google.com> Reviewed-by: Colton Lewis <coltonlewis@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230330174800.2677007-4-maz@kernel.org
This commit is contained in:
parent
eaacaa4f26
commit
326349943e
2 changed files with 12 additions and 0 deletions
|
@ -2223,6 +2223,17 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
|
||||||
.sign = FTR_UNSIGNED,
|
.sign = FTR_UNSIGNED,
|
||||||
.min_field_value = 1,
|
.min_field_value = 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.desc = "Enhanced Counter Virtualization (CNTPOFF)",
|
||||||
|
.capability = ARM64_HAS_ECV_CNTPOFF,
|
||||||
|
.type = ARM64_CPUCAP_SYSTEM_FEATURE,
|
||||||
|
.matches = has_cpuid_feature,
|
||||||
|
.sys_reg = SYS_ID_AA64MMFR0_EL1,
|
||||||
|
.field_pos = ID_AA64MMFR0_EL1_ECV_SHIFT,
|
||||||
|
.field_width = 4,
|
||||||
|
.sign = FTR_UNSIGNED,
|
||||||
|
.min_field_value = ID_AA64MMFR0_EL1_ECV_CNTPOFF,
|
||||||
|
},
|
||||||
#ifdef CONFIG_ARM64_PAN
|
#ifdef CONFIG_ARM64_PAN
|
||||||
{
|
{
|
||||||
.desc = "Privileged Access Never",
|
.desc = "Privileged Access Never",
|
||||||
|
|
|
@ -23,6 +23,7 @@ HAS_DCPOP
|
||||||
HAS_DIT
|
HAS_DIT
|
||||||
HAS_E0PD
|
HAS_E0PD
|
||||||
HAS_ECV
|
HAS_ECV
|
||||||
|
HAS_ECV_CNTPOFF
|
||||||
HAS_EPAN
|
HAS_EPAN
|
||||||
HAS_GENERIC_AUTH
|
HAS_GENERIC_AUTH
|
||||||
HAS_GENERIC_AUTH_ARCH_QARMA3
|
HAS_GENERIC_AUTH_ARCH_QARMA3
|
||||||
|
|
Loading…
Reference in a new issue