From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: Huang Ying <ying.huang@intel.com>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>,
Dean Nelson <dnelson@redhat.com>
Subject: Re: [PATCH] Fix SRAO/SRAR MCE injecting on guest without MCG_SER_P
Date: Fri, 08 Oct 2010 17:31:38 +0900 [thread overview]
Message-ID: <4CAED6EA.2090101@jp.fujitsu.com> (raw)
In-Reply-To: <1286526314.7768.97.camel@yhuang-dev>
(2010/10/08 17:25), Huang Ying wrote:
> On real machine, if MCG_SER_P in MSR_MCG_CAP is not set, SRAO/SRAR MCE
> should not be raised by hardware. This patch makes QEMU-KVM to follow
> the same rule.
>
> Reported-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
> Signed-off-by: Huang Ying <ying.huang@intel.com>
> ---
> qemu-kvm.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> --- a/qemu-kvm.c
> +++ b/qemu-kvm.c
> @@ -1134,7 +1134,7 @@ static void sigbus_handler(int n, struct
> void *ctx)
> {
> #if defined(KVM_CAP_MCE) && defined(TARGET_I386)
> - if (first_cpu->mcg_cap && siginfo->ssi_addr
> + if ((first_cpu->mcg_cap & MCG_SER_P) && siginfo->ssi_addr
> && siginfo->ssi_code == BUS_MCEERR_AO) {
> uint64_t status;
> void *vaddr;
> @@ -1324,7 +1324,7 @@ static void kvm_on_sigbus(CPUState *env,
> unsigned long paddr;
> int r;
>
> - if (env->mcg_cap && siginfo->si_addr
> + if ((env->mcg_cap & MCG_SER_P) && siginfo->si_addr
> && (siginfo->si_code == BUS_MCEERR_AR
> || siginfo->si_code == BUS_MCEERR_AO)) {
> if (siginfo->si_code == BUS_MCEERR_AR) {
> @@ -1356,7 +1356,7 @@ static void kvm_on_sigbus(CPUState *env,
> if (do_qemu_ram_addr_from_host(vaddr, &ram_addr) ||
> !kvm_physical_memory_addr_from_ram(kvm_state, ram_addr, (target_phys_addr_t *)&paddr)) {
> fprintf(stderr, "Hardware memory error for memory used by "
> - "QEMU itself instaed of guest system!\n");
> + "QEMU itself instead of guest system!\n");
> /* Hope we are lucky for AO MCE */
> if (siginfo->si_code == BUS_MCEERR_AO) {
> return;
Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Thanks,
H.Seto
prev parent reply other threads:[~2010-10-08 8:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-08 8:25 [PATCH] Fix SRAO/SRAR MCE injecting on guest without MCG_SER_P Huang Ying
2010-10-08 8:31 ` Hidetoshi Seto [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=4CAED6EA.2090101@jp.fujitsu.com \
--to=seto.hidetoshi@jp.fujitsu.com \
--cc=andi@firstfloor.org \
--cc=avi@redhat.com \
--cc=dnelson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=ying.huang@intel.com \
/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.