From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58370 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmAPj-0000D0-Ae for qemu-devel@nongnu.org; Thu, 19 Aug 2010 15:04:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmAPg-0000Sm-Q6 for qemu-devel@nongnu.org; Thu, 19 Aug 2010 15:04:35 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:44838) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmAPg-0000Sf-Ln for qemu-devel@nongnu.org; Thu, 19 Aug 2010 15:04:32 -0400 Received: by iwn8 with SMTP id 8so1439521iwn.4 for ; Thu, 19 Aug 2010 12:04:32 -0700 (PDT) Message-ID: <4C6D803B.2000806@codemonkey.ws> Date: Thu, 19 Aug 2010 14:04:27 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Fix bug for vcpu hotplug References: <4C67D844.5060306@redhat.com> <4C6B8CC8.3040200@redhat.com> <4C6D4CA2.5060500@codemonkey.ws> <4C6D4F21.6070605@redhat.com> In-Reply-To: <4C6D4F21.6070605@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: "Liu, Jinsong" , "Yang, Sheng" , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , "Li, Xin" On 08/19/2010 10:34 AM, Avi Kivity wrote: > On 08/19/2010 06:24 PM, Anthony Liguori wrote: >> On 08/18/2010 02:33 AM, Avi Kivity wrote: >>> On 08/18/2010 10:17 AM, Liu, Jinsong wrote: >>>> During test, we found qemu-kvm has a bug result in guestos shutdown >>>> when vcpu hotadd. >>>> This patch is to fix the bug, allow hotplug for sysbus qdev. >>>> >>>> --- a/hw/qdev.c >>>> +++ b/hw/qdev.c >>>> @@ -108,6 +108,7 @@ DeviceState *qdev_create(BusState *bus, const >>>> char *name) >>>> if (!bus) { >>>> if (!main_system_bus) { >>>> main_system_bus = qbus_create(&system_bus_info, NULL, >>>> "main-system-bus"); >>>> + main_system_bus->allow_hotplug = 1; >>>> } >>>> bus = main_system_bus; >>>> } >>> >>> >>> Looks reasonable to me. >> >> Not really to me. >> >> SysBus does not support hotplugging and CPU hot plug shouldn't have >> anything to do with qdev hotplug. >> >> Can you explain a bit more why this is needed? >> > > On cpu hotplug an apic is added, and apics live on main_system_bus. That's the problem then. An APIC does not live on any bus and that's where the problem ought to be fixed. Regards, Anthony Liguori