KVM: arm64: Fix missing RES1 in emulation of DBGBIDR
authorMarc Zyngier <maz@kernel.org>
Sat, 15 Feb 2020 17:02:06 +0000 (17:02 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 3 Feb 2021 10:59:06 +0000 (10:59 +0000)
The AArch32 CP14 DBGDIDR has bit 15 set to RES1, which our current
emulation doesn't set. Just add the missing bit.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/sys_regs.c

index 3313ded..0c08324 100644 (file)
@@ -1711,7 +1711,7 @@ static bool trap_dbgidr(struct kvm_vcpu *vcpu,
                p->regval = ((((dfr >> ID_AA64DFR0_WRPS_SHIFT) & 0xf) << 28) |
                             (((dfr >> ID_AA64DFR0_BRPS_SHIFT) & 0xf) << 24) |
                             (((dfr >> ID_AA64DFR0_CTX_CMPS_SHIFT) & 0xf) << 20)
-                            | (6 << 16) | (el3 << 14) | (el3 << 12));
+                            | (6 << 16) | (1 << 15) | (el3 << 14) | (el3 << 12));
                return true;
        }
 }