From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUyVM-0002y1-Lu for qemu-devel@nongnu.org; Wed, 24 Apr 2013 08:08:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUyVH-00027H-RU for qemu-devel@nongnu.org; Wed, 24 Apr 2013 08:08:56 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39034 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUyVH-000276-Kt for qemu-devel@nongnu.org; Wed, 24 Apr 2013 08:08:51 -0400 Message-ID: <5177CB4D.8040705@suse.de> Date: Wed, 24 Apr 2013 14:08:45 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1366705795-24732-1-git-send-email-imammedo@redhat.com> <1366705795-24732-3-git-send-email-imammedo@redhat.com> <5176AFDA.1050700@suse.de> In-Reply-To: <5176AFDA.1050700@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 02/21] cpu: call cpu_synchronize_post_init() from CPUClass.realize() if hotplugged List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com, ehabkost@redhat.com, gleb@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, quintela@redhat.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, aderumier@odiso.com, lcapitulino@redhat.com, blauwirbel@gmail.com, yang.z.zhang@intel.com, alex.williamson@redhat.com, kraxel@redhat.com, anthony.perard@citrix.com, pbonzini@redhat.com, armbru@redhat.com, stefano.stabellini@eu.citrix.com, rth@twiddle.net Am 23.04.2013 17:59, schrieb Andreas F=E4rber: > Am 23.04.2013 10:29, schrieb Igor Mammedov: >> ... to synchronize CPU state to KVM >> >> Signed-off-by: Igor Mammedov >> Reviewed-by: Eduardo Habkost >> --- >> v2: >> * linking kvm-stub.o to *-user target moved in separate patch >=20 > Thanks, applied to qom-cpu: > https://github.com/afaerber/qemu-cpu/commits/qom-cpu To facilitate conflict resolution for future patches, I have modified this to match other functions in there and to spare refactorings: diff --git a/qom/cpu.c b/qom/cpu.c index 0c76712..66f7c00 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -58,8 +58,10 @@ static ObjectClass *cpu_common_class_by_name(const char *cpu_model) static void cpu_common_realizefn(DeviceState *dev, Error **errp) { + CPUState *cpu =3D CPU(dev); + if (dev->hotplugged) { - cpu_synchronize_post_init(CPU(dev)); + cpu_synchronize_post_init(cpu); } } Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg