From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScxUb-0000Zi-6e for qemu-devel@nongnu.org; Fri, 08 Jun 2012 07:36:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScxUZ-0001LZ-Ev for qemu-devel@nongnu.org; Fri, 08 Jun 2012 07:36:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScxUZ-0001Kv-6X for qemu-devel@nongnu.org; Fri, 08 Jun 2012 07:36:35 -0400 Date: Fri, 8 Jun 2012 13:36:27 +0200 From: Igor Mammedov Message-ID: <20120608113627.GB22512@thinkpad.mammed.net> References: <1337742502-28565-1-git-send-email-afaerber@suse.de> <1337742502-28565-5-git-send-email-afaerber@suse.de> <20120608082006.GA22512@thinkpad.mammed.net> <4FD1C1AF.2020208@suse.de> <4FD1D243.7090600@siemens.com> <4FD1D5A2.8090008@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <4FD1D5A2.8090008@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-next 04/59] pc: Add CPU as /machine/cpu[n] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Jan Kiszka , Anthony Liguori , "qemu-devel@nongnu.org" , Igor Mammedov , Paolo Bonzini On Fri, Jun 08, 2012 at 12:36:18PM +0200, Andreas F=E4rber wrote: > Am 08.06.2012 12:21, schrieb Jan Kiszka: > > On 2012-06-08 11:11, Andreas F=E4rber wrote: > >> >From what I understand about the x86 modeling, the only case this > >> matters is if you hot-unplug CPU 0, right? Question is, what happens > >> with the APIC then? I would guess the remaining n-1 CPUs still want = to > >> access the APIC > >=20 > > APICs are per-CPU, each has its own. >=20 > Uh, seems I'm seriously confusing APIC with something else then... >=20 > Anyway, if each CPU always has its own APIC there's no reason to link<> > them. It should be a child<> and it should be initialized in-place. in [5/59] you create a back_link<> from APIC to parent cpu to replace cpu= _env pointer (i.e. something that could be ptr property). And from what I've r= ead link<> is kind of strong typed replacement for ptr properties, correct me= if I wrong. So having link<> there should be ok, except of that CPU should have paren= t before it will set back_link<> "cpu" in APIC. >=20 > Igor, can you please look into that? Sure, Could you point to an example of creating a QOMified object in plac= e, please? >=20 > In that case the only open issue would be whether to use cpu_index or > the APIC ID as the property name in this patch. not only, cpu_x86_init() now represents create/set_props/realize sequence and making cpu a child after set_props/realize is wrong. But if cpu_x86_i= nit() were replaced by its contents in pc_new_cpu and CPU were made a child right af= ter object_new(X86CPU) then problem would be avoided. and the rest of propert= ies (including APIC) could be set after that and at the end realizefn() is called. >=20 > Andreas >=20 > --=20 > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrn= berg >=20