Received: from eggs.gnu.org ([208.118.235.92]:59422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URm9I-0007nR-Ay for qemu-devel@nongnu.org; Mon, 15 Apr 2013 12:21:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URm9G-0006x2-Ob for qemu-devel@nongnu.org; Mon, 15 Apr 2013 12:20:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URm9G-0006wo-Fm for qemu-devel@nongnu.org; Mon, 15 Apr 2013 12:20:54 -0400 Date: Mon, 15 Apr 2013 18:17:58 +0200 From: Igor Mammedov Message-ID: <20130415181758.48300183@nial.usersys.redhat.com> In-Reply-To: <516C2590.8060903@suse.de> References: <1365691918-30594-1-git-send-email-imammedo@redhat.com> <1365691918-30594-14-git-send-email-imammedo@redhat.com> <516C1F0B.6070403@suse.de> <20130415174939.0f3816e6@nial.usersys.redhat.com> <516C2590.8060903@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 13/19] target-i386: cpu: attach ICC bus to CPU on its creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?ISO-8859-1?B?RuRyYmVy?= Cc: aliguori@us.ibm.com, ehabkost@redhat.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, aderumier@odiso.com, lcapitulino@redhat.com, jfrei@linux.vnet.ibm.com, yang.z.zhang@intel.com, Paolo Bonzini , lig.fnst@cn.fujitsu.com, rth@twiddle.net On Mon, 15 Apr 2013 18:06:40 +0200 Andreas F=E4rber wrote: > Am 15.04.2013 17:49, schrieb Igor Mammedov: > > On Mon, 15 Apr 2013 17:38:51 +0200 > > Andreas F=E4rber wrote: > >=20 > >> Am 11.04.2013 16:51, schrieb Igor Mammedov: > >>> ... during startup, so it would be possible to uplug it later > >> > >> unplug? > > CPU won't be unplug-able if it's not on ICC bus. >=20 > Sorry? Question was whether "uplug" is a typo and should read "unplug"? > On openSUSE 12.3 there is no command called uplug. :) Thanks, I'll fix it. >=20 > >>> and set bus_type to TYPE_ICC_BUS for X86CPU type to make device_add > >>> attach hotplugged CPU to ICC bus. > >>> > >>> Signed-off-by: Igor Mammedov > >>> --- > >>> target-i386/cpu.c | 7 +++++++ > >>> 1 file changed, 7 insertions(+) > >>> > >>> diff --git a/target-i386/cpu.c b/target-i386/cpu.c > >>> index 4ddc18a..2bb38d6 100644 > >>> --- a/target-i386/cpu.c > >>> +++ b/target-i386/cpu.c > [...] > >>> @@ -1620,6 +1622,10 @@ X86CPU *cpu_x86_create(const char *cpu_model, > >>> Error **errp) features =3D model_pieces[1]; > >>> =20 > >>> cpu =3D X86_CPU(object_new(TYPE_X86_CPU)); > >>> + if (icc_bus) { > >>> + qdev_set_parent_bus(DEVICE(cpu), BUS(icc_bus)); > >>> + object_unref(OBJECT(cpu)); > >> > >> Why are you unref'ing here? (Paolo?) > >=20 > > To leave only one reference to it since qdev_set_parent_bus() just > > incremented it. Like it's done in qdev_try_create(). >=20 > Ah, I see, thanks. >=20 > Andreas >=20