diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2013-05-17 08:41:35 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-05-21 04:55:23 -0400 |
commit | 49b99e1e0dedbd6cc93b2d2776b60fb7151ff3d7 (patch) | |
tree | 204052379d35e6459207571b3e2bb1d460e2cef2 /arch/s390/kernel/entry64.S | |
parent | 95d38fd0bcf1996082f5f8762e6f1c849755e0c6 (diff) |
s390/kvm: Provide a way to prevent reentering SIE
Lets provide functions to prevent KVM from reentering SIE and
to kick cpus out of SIE. We cannot use the common kvm_vcpu_kick code,
since we need to kick out guests in places that hold architecture
specific locks (e.g. pgste lock) which might be necessary on the
other cpus - so no waiting possible.
So lets provide a bit in a private field of the sie control block
that acts as a gate keeper, after we claimed we are in SIE.
Please note that we do not reuse prog0c, since we want to access
that bit without atomic ops.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/s390/kernel/entry64.S')
-rw-r--r-- | arch/s390/kernel/entry64.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index c2e81b4ea42c..c7daeefb9864 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -958,7 +958,9 @@ sie_loop: | |||
958 | lctlg %c1,%c1,__GMAP_ASCE(%r14) # load primary asce | 958 | lctlg %c1,%c1,__GMAP_ASCE(%r14) # load primary asce |
959 | sie_gmap: | 959 | sie_gmap: |
960 | lg %r14,__SF_EMPTY(%r15) # get control block pointer | 960 | lg %r14,__SF_EMPTY(%r15) # get control block pointer |
961 | oi __SIE_PROG0C+3(%r14),1 # we are in SIE now | 961 | oi __SIE_PROG0C+3(%r14),1 # we are going into SIE now |
962 | tm __SIE_PROG20+3(%r14),1 # last exit... | ||
963 | jnz sie_done | ||
962 | LPP __SF_EMPTY(%r15) # set guest id | 964 | LPP __SF_EMPTY(%r15) # set guest id |
963 | sie 0(%r14) | 965 | sie 0(%r14) |
964 | sie_done: | 966 | sie_done: |