[PATCH v2 1/3] powerpc/kvm: Remove redundant save of SIER AND MMCR2

Joel Stanley joel at jms.id.au
Tue Jul 8 16:38:20 EST 2014

These two registers are already saved in the block above. Aside from
being unnecessary, by the time we get down to the second save location
r8 no longer contains MMCR2, so we are clobbering the saved value with

MMCR2 primarily consists of counter freeze bits. So restoring the value
of PMC5 into MMCR2 will most likely have the effect of freezing

Fixes: 72cde5a88d37 ("KVM: PPC: Book3S HV: Save/restore host PMU registers that are new in POWER8")
Cc: stable at vger.kernel.org
Signed-off-by: Joel Stanley <joel at jms.id.au>
Acked-by: Michael Ellerman <mpe at ellerman.id.au>
Acked-by: Paul Mackerras <paulus at samba.org>
Reviewed-by: Alexander Graf <agraf at suse.de>
 - Add comments from mpe

 arch/powerpc/kvm/book3s_hv_interrupts.S | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_hv_interrupts.S b/arch/powerpc/kvm/book3s_hv_interrupts.S
index 8c86422..731be74 100644
--- a/arch/powerpc/kvm/book3s_hv_interrupts.S
+++ b/arch/powerpc/kvm/book3s_hv_interrupts.S
@@ -127,11 +127,6 @@ BEGIN_FTR_SECTION
 	stw	r10, HSTATE_PMC + 24(r13)
 	stw	r11, HSTATE_PMC + 28(r13)
-	mfspr	r9, SPRN_SIER
-	std	r8, HSTATE_MMCR + 40(r13)
-	std	r9, HSTATE_MMCR + 48(r13)

More information about the Linuxppc-dev mailing list