From patchwork Mon Nov 21 09:12:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 126721 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 87EDEB7218 for ; Mon, 21 Nov 2011 20:12:32 +1100 (EST) Received: from localhost ([::1]:52423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSPvJ-0004cx-AT for incoming@patchwork.ozlabs.org; Mon, 21 Nov 2011 04:12:21 -0500 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 Received: from [9.152.224.64] (dyn-9-152-224-64.boeblingen.de.ibm.com [9.152.224.64]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pAL9C4gp000568; 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 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Lightning/1.0b2 Thunderbird/3.1.15 MIME-Version: 1.0 To: Alexander Graf X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 194.196.100.163 Cc: "qemu-devel@nongnu.org" Subject: [Qemu-devel] [PATCH] s390: fix cpu hotplug / cpu activity on interrupts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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;