All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Meng Xu <xumengpanda@gmail.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Question about Xen reboot on panic
Date: Fri, 13 Nov 2015 00:39:49 -0700	[thread overview]
Message-ID: <5645A1D502000078000B494F@prv-mh.provo.novell.com> (raw)
In-Reply-To: <CAENZ-+kcXBWzamzc4cEVFSwq-GGYf7=WhrKGQac474mz3eySfw@mail.gmail.com>

>>> On 12.11.15 at 20:54, <xumengpanda@gmail.com> wrote:
> However, the line after that if statement is:
> smp_send_stop();
> 
> which is not in the if ( get_apic_id() != boot_cpu_physical_apicid ) 
> statement.
> 
> So P0 may run this code, and from what I read from this
> smp_send_stop(), it has the following code:
> 
>     local_irq_disable();
> 
>     __stop_this_cpu();
> 
>     disable_IO_APIC();
> 
>     hpet_disable();
> 
>     local_irq_enable();
> 
> I'm guessing at __stop_this_cpu() when it is on P0, P0 will be
> stopped. That's why P0 will never have the chance to proceed to the
> rest of logic in the machine_restart(). Therefore, the machine won't
> restart.

The code is quite clear in this regard - smp_send_stop() stops all other
CPUs, but calls only __stop_this_cpu() (not stop_this_cpu()) for itself.
I.e. execution is at least supposed to make it back to the caller. Also
please don't forget that this is working for most everyone else, so
what you're looking for is more likely some oddity on your system, not
some general issue.

(Btw - are you doing this on master, which is what I'd expect you to?
I ask because the sequence of calls you quote above doesn't match
with what I see on there. I'd really like to avoid hunting a problem
long fixed.)

> If I move this  smp_send_stop(void) into the if statement, Xen will reboot.
> 
> Do you think this could be a fix?

Definitely not.

Jan

  reply	other threads:[~2015-11-13  7:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 22:49 Question about Xen reboot on panic Meng Xu
2015-11-11 22:54 ` Andrew Cooper
2015-11-11 23:21   ` Meng Xu
2015-11-11 23:34     ` Andrew Cooper
2015-11-12  2:10       ` Meng Xu
2015-11-12 12:52         ` Andrew Cooper
2015-11-12 12:57           ` Wei Liu
2015-11-12 13:16             ` Ian Campbell
2015-11-12 15:09               ` Meng Xu
2015-11-12 15:07           ` Meng Xu
2015-11-12 16:13             ` Meng Xu
2015-11-12 16:57               ` Meng Xu
2015-11-12 17:08                 ` Jan Beulich
2015-11-12 19:54                   ` Meng Xu
2015-11-13  7:39                     ` Jan Beulich [this message]
2015-11-19  3:58                       ` Meng Xu
2015-11-19  7:26                         ` 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=5645A1D502000078000B494F@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xumengpanda@gmail.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.