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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Feb 2016 20:01:20 +0000 (12:01 -0800)
commit921fa9b77380b0c3df67c424c2a68db5214ab461
tree35570880251775da71ff85f2475c77eee2b85f1d
parentb3e336de65ebdd5ed85ba1f03216091a28583e7e
KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8

commit 760a7364f27d974d100118d88190e574626e18a6 upstream.

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.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kvm/book3s_hv_rmhandlers.S