[PATCH 5/9] KVM: arm64: selftests: Have debug_version() use cpuid_get_ufield() helper
Reiji Watanabe
reijiw at google.com
Wed Aug 24 22:08:42 PDT 2022
Change debug_version() to use cpuid_get_ufield() to extract DebugVer
field from the AA64DFR0_EL1 register value.
Signed-off-by: Reiji Watanabe <reijiw at google.com>
---
tools/testing/selftests/kvm/aarch64/debug-exceptions.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/aarch64/debug-exceptions.c b/tools/testing/selftests/kvm/aarch64/debug-exceptions.c
index 713c7240b680..17b17359ac41 100644
--- a/tools/testing/selftests/kvm/aarch64/debug-exceptions.c
+++ b/tools/testing/selftests/kvm/aarch64/debug-exceptions.c
@@ -320,7 +320,7 @@ static int debug_version(struct kvm_vcpu *vcpu)
uint64_t id_aa64dfr0;
vcpu_get_reg(vcpu, KVM_ARM64_SYS_REG(SYS_ID_AA64DFR0_EL1), &id_aa64dfr0);
- return id_aa64dfr0 & 0xf;
+ return cpuid_get_ufield(id_aa64dfr0, ID_AA64DFR0_DEBUGVER_SHIFT);
}
int main(int argc, char *argv[])
--
2.37.1.595.g718a3a8f04-goog
More information about the linux-arm-kernel
mailing list