Skip to content

Commit a94ff82

Browse files
huthsashalevin
authored andcommitted
KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8
[ Upstream commit 760a736 ] In the old DABR register, the BT (Breakpoint Translation) bit is bit number 61. In the new DAWRX register, the WT (Watchpoint Translation) bit is bit number 59. So to move the DABR-BT bit into the position of the DAWRX-WT bit, it has to be shifted by two, not only by one. This fixes hardware watchpoints in gdb of older guests that only use the H_SET_DABR/X interface instead of the new H_SET_MODE interface. Cc: [email protected] # v3.14+ Signed-off-by: Thomas Huth <[email protected]> Reviewed-by: Laurent Vivier <[email protected]> Reviewed-by: David Gibson <[email protected]> Signed-off-by: Paul Mackerras <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 51975a2 commit a94ff82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/kvm/book3s_hv_rmhandlers.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
20472047

20482048
/* Emulate H_SET_DABR/X on P8 for the sake of compat mode guests */
20492049
2: rlwimi r5, r4, 5, DAWRX_DR | DAWRX_DW
2050-
rlwimi r5, r4, 1, DAWRX_WT
2050+
rlwimi r5, r4, 2, DAWRX_WT
20512051
clrrdi r4, r4, 3
20522052
std r4, VCPU_DAWR(r3)
20532053
std r5, VCPU_DAWRX(r3)

0 commit comments

Comments
 (0)