From fe1ebbf9a558e3052b29b5ba66601d3613bb6276 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Sat, 15 Feb 2020 17:02:06 +0000 Subject: [PATCH] FROMGIT: KVM: arm64: Fix missing RES1 in emulation of DBGBIDR 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 Reviewed-by: Eric Auger Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier (cherry picked from commit bea7e97fef888421ecc21d03c6e4f9ae1451a78d git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next) Signed-off-by: Will Deacon Change-Id: I2d85bf57a967ad089a0b1cda47fb49e275379a62 Bug: 178098380 Test: atest VirtualizationHostTestCases on an EL2-enabled device --- arch/arm64/kvm/sys_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 7c4f79532406..2bf56cf1c777 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -1734,7 +1734,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; } }