All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Huang <kai.huang@linux.intel.com>
To: jinsong.liu@alibaba-inc.com, chegger@amazon.de, JBeulich@suse.com
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH v2] x86/MCE: bypass uninitialized vcpu in vMCE injection
Date: Mon, 12 May 2014 10:01:11 +0800	[thread overview]
Message-ID: <53702B67.2020803@linux.intel.com> (raw)
In-Reply-To: <1399602873-18046-1-git-send-email-kai.huang@linux.intel.com>

Hi Egger, Jan, Jinsong,

Ping. Would you take a look again?

Thanks,
-Kai
On 05/09/2014 10:34 AM, Kai Huang wrote:
> Dom0 may bring up less number of vCPUs than xen hypervisor actually created for
> it, and in this case, on Intel platform, vMCE injection to dom0 will fail due to
> injecting vMCE to uninitialized vcpu, and cause dom0 crash.
>
> Signed-off-by: Kai Huang <kai.huang@linux.intel.com>
> ---
>   xen/arch/x86/cpu/mcheck/vmce.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/xen/arch/x86/cpu/mcheck/vmce.c b/xen/arch/x86/cpu/mcheck/vmce.c
> index c83375e..73733df 100644
> --- a/xen/arch/x86/cpu/mcheck/vmce.c
> +++ b/xen/arch/x86/cpu/mcheck/vmce.c
> @@ -356,6 +356,10 @@ int inject_vmce(struct domain *d, int vcpu)
>           if ( vcpu != VMCE_INJECT_BROADCAST && vcpu != v->vcpu_id )
>               continue;
>   
> +        /* Don't inject to uninitialized VCPU. */
> +        if ( !v->is_initialised )
> +            continue;
> +
>           if ( (has_hvm_container_domain(d) ||
>                 guest_has_trap_callback(d, v->vcpu_id, TRAP_machine_check)) &&
>                !test_and_set_bool(v->mce_pending) )

  reply	other threads:[~2014-05-12  2:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09  2:34 [PATCH v2] x86/MCE: bypass uninitialized vcpu in vMCE injection Kai Huang
2014-05-12  2:01 ` Kai Huang [this message]
2014-05-12  9:00   ` Jan Beulich
2014-05-13  1:30     ` Kai Huang
2014-05-13  8:21 ` Egger, Christoph

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=53702B67.2020803@linux.intel.com \
    --to=kai.huang@linux.intel.com \
    --cc=JBeulich@suse.com \
    --cc=chegger@amazon.de \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=xen-devel@lists.xen.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.