KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8
authorThomas Huth <thuth@redhat.com>
Fri, 20 Nov 2015 08:11:45 +0000 (09:11 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 1 Feb 2016 16:37:09 +0000 (11:37 -0500)
commita94ff8213e3bd0918424f3208450955638f98197
tree652318179febc872ed16db0fdc6b14fecfe76133
parent51975a203210d3a94a7711651b1045ed0e3514ed
KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8

[ Upstream commit 760a7364f27d974d100118d88190e574626e18a6 ]

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: stable@vger.kernel.org # v3.14+
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/powerpc/kvm/book3s_hv_rmhandlers.S