diff options
author | Marc Zyngier <maz@kernel.org> | 2020-02-16 18:44:29 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-02-03 12:00:08 +0100 |
commit | 94893fc9ad8cdb05fdb64e00128997bc530e2ca9 (patch) | |
tree | 92a35c688487a62a19497230ad6588fcbe2aab63 /arch/arm64/kvm/sys_regs.c | |
parent | KVM: arm64: Refactor filtering of ID registers (diff) | |
download | linux-94893fc9ad8cdb05fdb64e00128997bc530e2ca9.tar.xz linux-94893fc9ad8cdb05fdb64e00128997bc530e2ca9.zip |
KVM: arm64: Limit the debug architecture to ARMv8.0
Let's not pretend we support anything but ARMv8.0 as far as the
debug architecture is concerned.
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/sys_regs.c')
-rw-r--r-- | arch/arm64/kvm/sys_regs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index dda16d60197b..8f79ec1fffa7 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -1048,6 +1048,9 @@ static u64 read_id_reg(const struct kvm_vcpu *vcpu, FEATURE(ID_AA64ISAR1_GPI)); break; case SYS_ID_AA64DFR0_EL1: + /* Limit debug to ARMv8.0 */ + val &= ~FEATURE(ID_AA64DFR0_DEBUGVER); + val |= FIELD_PREP(FEATURE(ID_AA64DFR0_DEBUGVER), 6); /* Limit guests to PMUv3 for ARMv8.1 */ val = cpuid_feature_cap_perfmon_field(val, ID_AA64DFR0_PMUVER_SHIFT, |