From: "Andreas Färber" <afaerber@suse.de>
To: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH for-1.1] target-i386: Defer MCE init
Date: Fri, 11 May 2012 14:29:10 +0200 [thread overview]
Message-ID: <4FAD0616.9030900@suse.de> (raw)
In-Reply-To: <6e4a5337-b79f-4a2a-8cb8-c059fbc463d3@zmail16.collab.prod.int.phx2.redhat.com>
Am 10.05.2012 21:14, schrieb Igor Mammedov:
> ----- Original Message -----
>> From: "Andreas Färber" <afaerber@suse.de>
>> To: qemu-devel@nongnu.org
>> Cc: "Eduardo Habkost" <ehabkost@redhat.com>, "Michael Roth" <mdroth@linux.vnet.ibm.com>, "Anthony Liguori"
>> <anthony@codemonkey.ws>, "Paolo Bonzini" <pbonzini@redhat.com>, imammedo@redhat.com, "Andreas Färber"
>> <afaerber@suse.de>
>> 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 >= 6 though, so we could end up with a
>> sequence such as for -cpu somecpu,family=6:
>>
>> x86_cpu_initfn => X86CPU::family == 5
>> mce_init => no-op
>> cpu_x86_register => X86CPU::family = 6
>> => MCE unexpectedly not init'ed
>>
>> or for -cpu someothercpu,family=5:
>>
>> x86_cpu_initfn => X86CPU::family == 6
>> mce_init => init'ed
>> cpu_x86_register => X86CPU::family = 5
>> => 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 <imammedo@redhat.com>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> Cc: Anthony Liguori <anthony@codemonkey.ws>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Cc: Eduardo Habkost <ehabkost@redhat.com>
>> Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
>> ---
>> target-i386/cpu-qom.h | 4 ++++
>> target-i386/cpu.c | 9 ++++++++-
>> target-i386/helper.c | 2 +-
>> 3 files changed, 13 insertions(+), 2 deletions(-)
>
> Looks good to me.
>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
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
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
prev parent reply other threads:[~2012-05-11 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 22:09 [Qemu-devel] [PATCH for-1.1] target-i386: Defer MCE init Andreas Färber
2012-05-10 19:14 ` Igor Mammedov
2012-05-11 12:29 ` Andreas Färber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FAD0616.9030900@suse.de \
--to=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.