s390x/kvm: implement handling of new SIGP orders
commit18ff949474cfbba892fdc34aa6ed7558afc78c5c
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tue, 24 Feb 2015 13:15:27 +0000 (24 14:15 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 10 Mar 2015 08:26:22 +0000 (10 09:26 +0100)
treeb485f7149893ac3cbcffdada29dde043508b783d
parent56dba22b7dc1c41ff7dca6593080a99bcca74b5c
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>
target-s390x/cpu.c
target-s390x/cpu.h
target-s390x/kvm.c
target-s390x/machine.c