From patchwork Thu Jul 21 12:45:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 994782 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6LCjLrB019828 for ; Thu, 21 Jul 2011 12:45:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752136Ab1GUMpR (ORCPT ); Thu, 21 Jul 2011 08:45:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20817 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751754Ab1GUMpQ (ORCPT ); Thu, 21 Jul 2011 08:45:16 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6LCjD2d006694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Jul 2011 08:45:13 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6LCjC78022025; Thu, 21 Jul 2011 08:45:13 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id 62FDD18D4C4; Thu, 21 Jul 2011 15:45:12 +0300 (IDT) Date: Thu, 21 Jul 2011 15:45:12 +0300 From: Gleb Natapov To: Jan Kiszka Cc: Vasilis Liaskovitis , "kvm@vger.kernel.org" Subject: Re: [PATCH] cpu hotplug issue Message-ID: <20110721124512.GI3044@redhat.com> References: <20110720083507.GS2400@redhat.com> <20110721113342.GB3044@redhat.com> <4E281090.9070300@siemens.com> <20110721115118.GD3044@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110721115118.GD3044@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 21 Jul 2011 12:45:21 +0000 (UTC) On Thu, Jul 21, 2011 at 02:51:18PM +0300, Gleb Natapov wrote: > > > Jan can you look at this please? > > > > I can't promise to do debugging myself. > > > > Also, as I never succeeded in getting anything working with CPU hotplug, > > even back in the days it was supposed to work, I'm a bit clueless /wrt > > to the right test cases. > > > CPU hotplug for Linux suppose to be easy (with allow_hotplug patch > applied). But we have two bugs currently. One is that ACPI interrupt > is not send when cpu is onlined (at least this appears to be the case). > I will look at that one. Another is that after new cpu is detected it > can't be onlined. > > After fixing the first bug the test should look like this: > 1. start vm with -smp 1,macpus=2 > 2. wait for it to boot > 3. do "cpu 1 online" in monitor. > 4. do "echo 1 > /sys/devices/system/cpu/cpu1/online" > > If step 4 should succeed. It fails now. > The first one was easy to solve. See patch below. Step 3 should be "cpu_set 1 online". --- Trigger sci interrupt after cpu hotplug/unplug event. Signed-off-by: Gleb Natapov -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index c30a050..40f3fcd 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -92,7 +92,8 @@ static void pm_update_sci(PIIX4PMState *s) ACPI_BITMASK_POWER_BUTTON_ENABLE | ACPI_BITMASK_GLOBAL_LOCK_ENABLE | ACPI_BITMASK_TIMER_ENABLE)) != 0) || - (((s->gpe.sts[0] & s->gpe.en[0]) & PIIX4_PCI_HOTPLUG_STATUS) != 0); + (((s->gpe.sts[0] & s->gpe.en[0]) & + (PIIX4_PCI_HOTPLUG_STATUS | PIIX4_CPU_HOTPLUG_STATUS)) != 0); qemu_set_irq(s->irq, sci_level); /* schedule a timer interruption if needed */