From eb24f7c6896e93047f2c58ffd3ba4f453e88280b Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Tue, 30 Sep 2014 10:57:29 +0200 Subject: s390x/kvm: proper use of the cpu states OPERATING and STOPPED This patch makes sure that halting a cpu and stopping a cpu are two different things. Stopping a cpu will also set the cpu halted - this is needed for common infrastructure to work (note that the stop and stopped flag cannot be used for our purpose because they are already used by other mechanisms). A cpu can be halted ("waiting") when it is operating. If interrupts are disabled, this is called a "disabled wait", as it can't be woken up anymore. A stopped cpu is treated like a "disabled wait" cpu, but in order to prepare for a proper cpu state synchronization with the kvm part, we need to track the real logical state of a cpu. Signed-off-by: David Hildenbrand Signed-off-by: Jens Freimann Reviewed-by: Cornelia Huck Reviewed-by: Christian Borntraeger CC: Andreas Faerber Tested-by: Christian Borntraeger Signed-off-by: Cornelia Huck --- hw/s390x/ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/s390x/ipl.c') diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 4fa9cffded..3b77c9a227 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -176,7 +176,7 @@ static void s390_ipl_reset(DeviceState *dev) } } - s390_add_running_cpu(cpu); + s390_cpu_set_state(CPU_STATE_OPERATING, cpu); } static void s390_ipl_class_init(ObjectClass *klass, void *data) -- cgit v1.2.1