All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86: don't deliver NMI to PVH Dom0
Date: Thu, 11 Dec 2014 11:41:48 +0000	[thread overview]
Message-ID: <548982FC.5040107@citrix.com> (raw)
In-Reply-To: <54898449020000780004EDDD@mail.emea.novell.com>

On 11/12/14 10:47, Jan Beulich wrote:
> ... for the time being: The mechanism used depends on the domain's use
> of the IRET hypercall.
>
> Also drop two bogus code lines spotted while going through the involved
> code paths: Addresses of per-CPU variables can't possibly be NULL, and
> the setting of st->vcpu in send_guest_trap()'s MCE case is redundant
> with an earlier cmpxchgptr().
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

>
> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -3168,7 +3168,6 @@ static void nmi_mce_softirq(void)
>      int cpu = smp_processor_id();
>      struct softirq_trap *st = &per_cpu(softirq_trap, cpu);
>  
> -    BUG_ON(st == NULL);
>      BUG_ON(st->vcpu == NULL);
>  
>      /* Set the tmp value unconditionally, so that
> @@ -3233,7 +3232,7 @@ static void nmi_hwdom_report(unsigned in
>  {
>      struct domain *d = hardware_domain;
>  
> -    if ( (d == NULL) || (d->vcpu == NULL) || (d->vcpu[0] == NULL) )
> +    if ( !d || !d->vcpu || !d->vcpu[0] || !is_pv_domain(d) /* PVH fixme */ )
>          return;
>  
>      set_bit(reason_idx, nmi_reason(d));
> @@ -3674,7 +3673,6 @@ int send_guest_trap(struct domain *d, ui
>  
>          if ( !test_and_set_bool(v->mce_pending) ) {
>                  st->domain = d;
> -                st->vcpu = v;
>                  st->processor = v->processor;
>  
>                  /* not safe to wake up a vcpu here */

  reply	other threads:[~2014-12-11 11:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11 10:47 [PATCH] x86: don't deliver NMI to PVH Dom0 Jan Beulich
2014-12-11 11:41 ` Andrew Cooper [this message]
2014-12-11 13:00 ` Tim Deegan
2014-12-11 13:09   ` Jan Beulich
2014-12-11 13:16     ` Tim Deegan
2014-12-11 13:20       ` Jan Beulich

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=548982FC.5040107@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.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.