xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Egger, Christoph" <chegger@amazon.de>
To: Kai Huang <kai.huang@linux.intel.com>, xen-devel@lists.xen.org
Cc: jinsong.liu@alibaba-inc.com, JBeulich@suse.com
Subject: Re: [PATCH v2] x86/MCE: bypass uninitialized vcpu in vMCE injection
Date: Tue, 13 May 2014 10:21:20 +0200	[thread overview]
Message-ID: <5371D600.3050701@amazon.de> (raw)
In-Reply-To: <1399602873-18046-1-git-send-email-kai.huang@linux.intel.com>

On 09.05.14 04:34, 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>

Acked-by: Christoph Egger <chegger@amazon.de>

> ---
>  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) )
> 

      parent reply	other threads:[~2014-05-13  8:21 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
2014-05-12  9:00   ` Jan Beulich
2014-05-13  1:30     ` Kai Huang
2014-05-13  8:21 ` Egger, Christoph [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=5371D600.3050701@amazon.de \
    --to=chegger@amazon.de \
    --cc=JBeulich@suse.com \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=kai.huang@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).