All pastes #2048196 Raw Edit

Anonymous

public text v1 · immutable
#2048196 ·published 2011-04-19 11:04 UTC
rendered paste body
ommit in linux-2.5/arch/s390/kvm on MAIN 

  sie64a.S                      +2     -2     1.3 -> 1.4

Subject: [PATCH] kvm-390: Let kernel exit SIE instruction on work

From: Carsten Otte <cotte@de.ibm.com>
From: Christian Borntraeger <borntraeger@de.ibm.com>

This patch fixes the sie exit on interrupts. The low level
interrupt handler returns to the PSW address in pt_regs and not
to the PSW address in the lowcore.
Without this fix a cpu bound guest might never leave guest state
since the host interrupt handler would blindly return to the
SIE instruction, even on need_resched and friends.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: stable@kernel.org

diff -u -r1.3 -r1.4 linux-2.5/arch/s390/kvm/sie64a.S
--- linux-2.5/arch/s390/kvm/sie64a.S	21 May 2010 13:41:51 -0000	1.3
+++ linux-2.5/arch/s390/kvm/sie64a.S	19 Apr 2011 09:20:46 -0000	1.4
@@ -48,10 +48,10 @@
 	tm	__TI_flags+7(%r2),_TIF_EXIT_SIE
 	jz	0f
 	larl	%r2,sie_exit			# work pending, leave sie
-	stg	%r2,__LC_RETURN_PSW+8
+	stg	%r2,SPI_PSW+8(0,%r15)
 	br	%r14
 0:	larl	%r2,sie_reenter			# re-enter with guest id
-	stg	%r2,__LC_RETURN_PSW+8
+	stg	%r2,SPI_PSW+8(0,%r15)
 1:	br	%r14

 /*