linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Li, Aubrey" <aubrey.li@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [BUG] x86: reboot doesn't reboot
Date: Fri, 4 Apr 2014 17:21:08 +0100	[thread overview]
Message-ID: <20140404162108.GA17393@srcf.ucam.org> (raw)
In-Reply-To: <CA+55aFwiO2kcNF4=ph9UWhPB7Vd6sRZ5B6g7qFV2yAwKBLP+2Q@mail.gmail.com>

On Fri, Apr 04, 2014 at 09:09:32AM -0700, Linus Torvalds wrote:
> On Fri, Apr 4, 2014 at 8:45 AM, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> >
> > Which is almost certainly because the other reboot methods are trapping
> > into SMI and hitting some hardware that we've left in a different state
> > to Windows.
> 
> Why are you making up these completely invalid arguments? Because you
> are making them up.
> 
> Our default reboot type is REBOOT_ACPI. That's the one we try *first*.
> There are no "other reboot methods" playing games.

We try ACPI. That will sometimes work, but infrequently. We then try the 
keyboard controller. That will generally work. We then try ACPI again, 
which will typically work because it's often now the second write to 
CF9. We then try the keyboard controller again, because that's what 
Windows does. The machine should now have rebooted.

But *any* of those accesses could have generated an SMI. For all we know 
the firmware is running huge quantities of code in response to any of 
those register accesses. We don't know what other hardware that code 
touches. We don't know what expectations it has. We don't know whether 
it was written by humans or written by some sort of simulated annealing 
mechanism that finally collapsed into a state where Windows rebooted and 
then shipped (or even humans behaving indistinguishably from a simulated 
annealing mechanism).

> And given this *fact*, your denial that "PCI reboot should never be
> used" is counterfactual. It may be true in some theoretical "this is
> how the world should work" universe, but in the real world it is just
> BS.
> 
> Why are you so deep in denial about this?

Because Windows doesn't use CF9 but machines reboot anyway. That 
shouldn't be a controversial point of view. We know that CF9 fixes some 
machines. We know that it breaks some machines. We don't know how many 
machines it fixes or how many machines it breaks. We don't know how many 
machines are flipped from a working state to a broken state whenever we 
fiddle with the order or introduce new heuristics. We don't know how 
many go from broken to working. The only way we can be reasonably 
certain that hardware will work is to duplicate precisely what Windows 
does, because that's all that most vendors will ever have tested.

The problem is that while we may know exactly what Windows does in terms 
of actually triggering the reboot, we don't know everything else it does 
on the shutdown path and it's difficult to instrument things like 
embedded controller accesses when qemu doesn't emulate one. I'll contact 
the people I know in Dell and see if I can find anyone from the firmware 
division who'll actually talk to us.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2014-04-04 16:21 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-03  6:14 [BUG] x86: reboot doesn't reboot Steven Rostedt
     [not found] ` <070BEF4AC20468458C22969097656CD91163106C@shsmsx102.ccr.corp.intel.com>
2014-04-03  6:30   ` FW: " Li, Aubrey
2014-04-03 12:09     ` Steven Rostedt
2014-04-03 13:41     ` Steven Rostedt
2014-04-03 13:45       ` Matthew Garrett
2014-04-03 14:10       ` H. Peter Anvin
2014-04-03 14:47         ` Steven Rostedt
2014-04-03 14:50           ` Matthew Garrett
2014-04-03 15:14             ` Steven Rostedt
2014-04-03 15:17           ` Steven Rostedt
2014-04-03 15:20             ` H. Peter Anvin
2014-04-03 15:21               ` H. Peter Anvin
2014-04-03 15:39                 ` Steven Rostedt
2014-04-03 15:58                   ` H. Peter Anvin
2014-04-03 16:13                     ` Steven Rostedt
2014-04-03 23:23                       ` Li, Aubrey
2014-04-03 23:40                         ` Steven Rostedt
2014-04-03 23:52                           ` Li, Aubrey
2014-04-04  0:12                             ` H. Peter Anvin
2014-04-04  1:27                               ` Li, Aubrey
2014-04-04  1:40                                 ` H. Peter Anvin
2014-04-04  6:13                                   ` Ingo Molnar
2014-04-04 12:34                                     ` H. Peter Anvin
2014-04-04 15:12                                 ` Matthew Garrett
2014-04-04 15:13                                   ` H. Peter Anvin
2014-04-04 15:36                                     ` Matthew Garrett
2014-04-04 15:39                                       ` H. Peter Anvin
2014-04-04 15:46                                         ` Matthew Garrett
2014-04-04 16:01                                         ` Steven Rostedt
2014-04-04 17:34                                       ` Ingo Molnar
2014-04-04 17:37                                         ` H. Peter Anvin
2014-04-04 17:44                                           ` Ingo Molnar
2014-04-04 18:00                                             ` Matthew Garrett
2014-04-04 15:38                                   ` Linus Torvalds
2014-04-04 15:45                                     ` Matthew Garrett
2014-04-04 15:54                                       ` Tobias Klausmann
2014-04-04 16:09                                       ` Linus Torvalds
2014-04-04 16:21                                         ` Matthew Garrett [this message]
2014-04-04 18:19                                           ` Linus Torvalds
2014-04-28  6:02                                           ` Yuhong Bao
2014-04-04 16:31                                       ` H. Peter Anvin
     [not found]                                         ` <cbb97256-9323-4d67-8523-061972e07ecc@email.android.com>
2014-04-04 17:01                                           ` H. Peter Anvin
2014-04-04 17:40                                             ` Ingo Molnar
2014-04-04 18:26                                         ` Linus Torvalds
2014-04-04  2:16                             ` Steven Rostedt
2014-04-04  2:43                               ` Li, Aubrey
2014-04-03 15:35           ` Steven Rostedt
2014-04-04  6:41           ` [PATCH] x86: Try the BIOS reboot method before the PCI reboot method Ingo Molnar
2014-04-04  7:53             ` [PATCH] x86: Don't do the BIOS and PCI 0xCF9 reboot methods by default Ingo Molnar
2014-04-04  7:54             ` [tip:x86/reboot] [PATCH] x86: Try the BIOS reboot method before the PCI reboot method tip-bot for Ingo Molnar
2014-04-04  8:00               ` Ingo Molnar
2014-04-04 12:37                 ` H. Peter Anvin
2014-04-04 13:30                 ` Steven Rostedt
2014-04-04 13:38                 ` Li, Aubrey
2014-04-04 15:09                   ` Adam Williamson
2014-04-04 15:13                   ` Matthew Garrett
2014-04-04 15:28                     ` H. Peter Anvin
2014-04-06 17:40                     ` One Thousand Gnomes
2014-04-06 18:40                       ` H. Peter Anvin
2014-04-07  8:00                         ` Li, Aubrey
2014-04-07 21:03                           ` H. Peter Anvin
2014-04-07 22:04                             ` Adam Williamson
2014-04-07 22:09                               ` H. Peter Anvin
2014-04-07 23:12                                 ` Adam Williamson
2014-04-09 20:50                                   ` H. Peter Anvin
2014-04-04 17:48                   ` Ingo Molnar
2014-04-04 19:12                     ` Linus Torvalds
2014-04-07 15:42                 ` Steven Rostedt
2014-04-14 11:22             ` [tip:x86/urgent] " tip-bot for Ingo Molnar
2014-04-14 11:27               ` Ingo Molnar
2014-04-14 16:04                 ` Steven Rostedt
2014-04-16  7:40             ` [tip:x86/urgent] x86: Remove the PCI reboot method from the default chain tip-bot for Ingo Molnar

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=20140404162108.GA17393@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=aubrey.li@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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).