Skip to content

Commit

Permalink
[S390] kvm-390: Let kernel exit SIE instruction on work
Browse files Browse the repository at this point in the history
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.

Cc: stable@kernel.org
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Carsten Otte authored and Martin Schwidefsky committed Apr 20, 2011
1 parent c7a29e5 commit 9ff4cfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/s390/kvm/sie64a.S
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ sie_irq_handler:
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

/*
Expand Down

0 comments on commit 9ff4cfb

Please sign in to comment.