From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyRQ5-0001z4-0x for qemu-devel@nongnu.org; Fri, 17 Feb 2012 12:16:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyRPx-0007nd-Li for qemu-devel@nongnu.org; Fri, 17 Feb 2012 12:16:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyRPx-0007nZ-DR for qemu-devel@nongnu.org; Fri, 17 Feb 2012 12:16:21 -0500 Message-ID: <4F3E8B60.80103@redhat.com> Date: Fri, 17 Feb 2012 18:16:16 +0100 From: Igor Mammedov MIME-Version: 1.0 References: <1329347774-23262-1-git-send-email-imammedo@redhat.com> <1329347774-23262-3-git-send-email-imammedo@redhat.com> <4F3D2A2A.9040002@suse.de> In-Reply-To: <4F3D2A2A.9040002@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/7] Convert pc cpu to qdev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: jan.kiszka@siemens.com, qemu-devel@nongnu.org, gleb@redhat.com On 02/16/2012 05:09 PM, Andreas F=E4rber wrote: > Am 16.02.2012 00:16, schrieb Igor Mammedov: >> Convert pc cpu to qdev device that is attached to icc bus, later >> hot-plug ability of icc bus will allow to implement cpu hot-plug. >> >> Signed-off-by: Igor Mammedov > > This conflicts with CPU QOM'ification across targets (and no longer > applies due to type_init() introduction). > >> --- >> hw/pc.c | 62 ++++++++++++++++++++++++++++++++++++++++= +++------ >> target-i386/cpu.h | 1 + >> target-i386/helper.c | 26 ++++++++++++++------ >> 3 files changed, 73 insertions(+), 16 deletions(-) >> >> diff --git a/hw/pc.c b/hw/pc.c >> index 33d8090..b8db5dc 100644 >> --- a/hw/pc.c >> +++ b/hw/pc.c >> @@ -922,6 +922,12 @@ void pc_acpi_smi_interrupt(void *opaque, int irq,= int level) >> } >> } >> >> +typedef struct CPUPC { >> + ICCBusDevice busdev; >> + char *model; >> + CPUState state; >> +} CPUPC; > > I don't like this approach. For starters, using CPUState as field rathe= r > than pointer seems a bad idea to me (CPUX86State would only be slightly > better). We should have a single code path through which we instantiate > CPUs, currently: cpu_$arch_init(const char *cpu_model) > With my series completed, this would return an X86CPU object. > > Depending on our liking, we could either place some ICC / APIC / > whatever fields directly into that, or embed the X86CPU in an object > such as yours above as a link. I do feel however that the model > string is misplaced there. Question is whether this ICC stuff is > actually part of the CPU or part of the CPU wiring on the mainboard - I > vaguely remember someone saying that this changed over time...? Having Yep, since P4 times sysbus used instead of icc so we can just ignore icc. > both depending on CPU subclass might also be an option, but I'd rather > leave such decisions as a follow-up to the core QOM'ification. > With QOM and your work this patch is obsolete. I see you've already QOM-i= fied X86CPU in your qom-cpu tree. With your permission I'll play with it and c= heck what could be done for cpu hot-plug feature. --=20 Thanks, Igor