Skip to contentSkip to conversation

Patch "KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Feb 24, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
kvm-ppc-fix-emulation-of-h_set_dabr-x-on-power8.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 760a7364f27d974d100118d88190e574626e18a6 Mon Sep 17 00:00:00 2001

From: Thomas Huth <[email protected]>
Date: Fri, 20 Nov 2015 09:11:45 +0100
Subject: KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8

From: Thomas Huth <[email protected]>

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.

---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/book3s_hv_rmhandlers.S +1 -1
@@ -2153,7 +2153,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
 
 	/* Emulate H_SET_DABR/X on P8 for the sake of compat mode guests */
 2:	rlwimi	r5, r4, 5, DAWRX_DR | DAWRX_DW
-	rlwimi	r5, r4, 1, DAWRX_WT
+	rlwimi	r5, r4, 2, DAWRX_WT
 	clrrdi	r4, r4, 3
 	std	r4, VCPU_DAWR(r3)
 	std	r5, VCPU_DAWRX(r3)

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/kvm-ppc-fix-emulation-of-h_set_dabr-x-on-power8.patch