From 854e42f3e8d3dcaf35b018cf56618fbcd15082d9 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Tue, 4 Oct 2011 05:20:59 +0000 Subject: s390: Fix cpu shutdown for KVM On s390 a shutdown is the state of all CPUs being either stopped or disabled (for interrupts) waiting. We have to track the overall number of running CPUs to call the shutdown sequence accordingly. This patch implements the counting and shutdown handling for the kvm path in qemu. Lets also wrap changes to env->halted and env->exception_index. Signed-off-by: Christian Borntraeger Signed-off-by: Alexander Graf --- target-s390x/cpu.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'target-s390x/cpu.h') diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index 95abe595b3..a66aa0166b 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -309,6 +309,8 @@ static inline void kvm_s390_interrupt_internal(CPUState *env, int type, } #endif CPUState *s390_cpu_addr2state(uint16_t cpu_addr); +void s390_add_running_cpu(CPUState *env); +unsigned s390_del_running_cpu(CPUState *env); /* from s390-virtio-bus */ extern const target_phys_addr_t virtio_size; -- cgit v1.2.1