aboutsummaryrefslogtreecommitdiff
path: root/target-s390x/cpu.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2015-02-24 14:15:27 +0100
committerChristian Borntraeger <borntraeger@de.ibm.com>2015-03-10 09:26:22 +0100
commit18ff949474cfbba892fdc34aa6ed7558afc78c5c (patch)
treeb485f7149893ac3cbcffdada29dde043508b783d /target-s390x/cpu.c
parent56dba22b7dc1c41ff7dca6593080a99bcca74b5c (diff)
s390x/kvm: implement handling of new SIGP orders
This patch adds handling code for the following SIGP orders: - SIGP SET ARCHITECTURE - SIGP SET PREFIX - SIGP STOP - SIGP STOP AND STORE STATUS - SIGP STORE STATUS AT ADDRESS SIGP STOP (AND STORE STATUS) are the only orders that can stay pending forever (and may only be interrupted by resets), so special care has to be taken about them. Their status also has to be tracked within QEMU. This patch takes care of migrating this status (e.g. if migration happens during a SIGP STOP). Due to the BQL, only one VCPU is currently able to execute SIGP handlers at a time. According to the PoP, BUSY should be returned if another SIGP order is currently being executed on a VCPU. This can only be implemented when the BQL does not protect all handlers. For now, all SIGP orders on all VCPUs will be serialized, which will be okay for the first shot. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Message-Id: <1424783731-43426-7-git-send-email-jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'target-s390x/cpu.c')
-rw-r--r--target-s390x/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index d2f6312e03..e0537fa222 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -96,6 +96,7 @@ static void s390_cpu_reset(CPUState *s)
env->pfault_token = -1UL;
scc->parent_reset(s);
+ cpu->env.sigp_order = 0;
s390_cpu_set_state(CPU_STATE_STOPPED, cpu);
tlb_flush(s, 1);
}
@@ -131,6 +132,7 @@ static void s390_cpu_full_reset(CPUState *s)
CPUS390XState *env = &cpu->env;
scc->parent_reset(s);
+ cpu->env.sigp_order = 0;
s390_cpu_set_state(CPU_STATE_STOPPED, cpu);
memset(env, 0, offsetof(CPUS390XState, cpu_num));