From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSoyE-0007KV-1O for qemu-devel@nongnu.org; Fri, 11 May 2012 08:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSoyB-0007MY-QD for qemu-devel@nongnu.org; Fri, 11 May 2012 08:29:17 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33414 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSoyB-0007ME-Gi for qemu-devel@nongnu.org; Fri, 11 May 2012 08:29:15 -0400 Message-ID: <4FAD0616.9030900@suse.de> Date: Fri, 11 May 2012 14:29:10 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <6e4a5337-b79f-4a2a-8cb8-c059fbc463d3@zmail16.collab.prod.int.phx2.redhat.com> In-Reply-To: <6e4a5337-b79f-4a2a-8cb8-c059fbc463d3@zmail16.collab.prod.int.phx2.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-1.1] target-i386: Defer MCE init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost , Anthony Liguori , Michael Roth Am 10.05.2012 21:14, schrieb Igor Mammedov: > ----- Original Message ----- >> From: "Andreas F=C3=A4rber" >> To: qemu-devel@nongnu.org >> Cc: "Eduardo Habkost" , "Michael Roth" , "Anthony Liguori" >> , "Paolo Bonzini" , imamme= do@redhat.com, "Andreas F=C3=A4rber" >> >> Sent: Thursday, May 10, 2012 12:09:10 AM >> Subject: [Qemu-devel] [PATCH for-1.1] target-i386: Defer MCE init >> >> Commit de024815e3b523addf58f1f79846b7fe74643678 (target-i386: QOM'ify >> CPU init) moved mce_init() call from helper.c:cpu_x86_init() into >> X86CPU's cpu.c:x86_cpu_initfn(). >> mce_init() checks for a family >=3D 6 though, so we could end up with = a >> sequence such as for -cpu somecpu,family=3D6: >> >> x86_cpu_initfn =3D> X86CPU::family =3D=3D 5 >> mce_init =3D> no-op >> cpu_x86_register =3D> X86CPU::family =3D 6 >> =3D> MCE unexpectedly not init'ed >> >> or for -cpu someothercpu,family=3D5: >> >> x86_cpu_initfn =3D> X86CPU::family =3D=3D 6 >> mce_init =3D> init'ed >> cpu_x86_register =3D> X86CPU::family =3D 5 >> =3D> MCE unexpectedly init'ed >> >> Therefore partially revert the above commit. To avoid moving >> mce_init() back into helper.c, foresightedly move it into a >> new x86_cpu_realize() function and, in lack of ObjectClass::realize, >> call it directly from cpu_x86_init(). >> >> While at it, move the qemu_init_vcpu() call that used to follow >> mce_init() in cpu_x86_init() into the new realizefn as well. >> >> Reported-by: Igor Mammedov >> Signed-off-by: Andreas F=C3=A4rber >> Cc: Anthony Liguori >> Cc: Paolo Bonzini >> Cc: Eduardo Habkost >> Cc: Michael Roth >> --- >> target-i386/cpu-qom.h | 4 ++++ >> target-i386/cpu.c | 9 ++++++++- >> target-i386/helper.c | 2 +- >> 3 files changed, 13 insertions(+), 2 deletions(-) >=20 > Looks good to me. >=20 > Reviewed-by: Igor Mammedov Thanks, I've applied it to qom-1.1 and qom-next branches for now: http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/qom-1.1 http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/qom-next Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg