From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSPvB-0004cd-LG for qemu-devel@nongnu.org; Mon, 21 Nov 2011 04:12:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSPvA-0003AB-Gy for qemu-devel@nongnu.org; Mon, 21 Nov 2011 04:12:13 -0500 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:39009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSPv9-00039v-Q2 for qemu-devel@nongnu.org; Mon, 21 Nov 2011 04:12:12 -0500 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id pAL9C5OH004737 for ; Mon, 21 Nov 2011 09:12:05 GMT Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAL9C5sV2469954 for ; Mon, 21 Nov 2011 09:12:05 GMT Received: from d06av07.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAL9C4aq000595 for ; Mon, 21 Nov 2011 02:12:04 -0700 Message-ID: <4ECA15E3.4010107@de.ibm.com> Date: Mon, 21 Nov 2011 10:12:03 +0100 From: Christian Borntraeger MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] s390: fix cpu hotplug / cpu activity on interrupts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "qemu-devel@nongnu.org" The add_del/running_cpu code and env->halted are tracking stopped cpus. Sleeping cpus (idle and enabled for interrupts) are waiting inside the kernel. No interrupt besides the restart can move a cpu from stopped to operational. This is already handled over there. So lets just remove the bogus wakup from the common interrupt delivery, otherwise any interrupt will wake up a cpu, even if this cpu is stopped (Thus leading to strange hangs on sigp restart) This fixes echo 0 > /sys/devices/system/cpu/cpu0/online echo 1 > /sys/devices/system/cpu/cpu0/online in the guest Signed-off-by: Christian Borntraeger --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -185,9 +185,6 @@ void kvm_s390_interrupt_internal(CPUState *env, int type, uint32_t parm, return; } - s390_add_running_cpu(env); - qemu_cpu_kick(env); - kvmint.type = type; kvmint.parm = parm; kvmint.parm64 = parm64;