linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Alex_Gagniuc@Dellteam.com>
To: <torvalds@linux-foundation.org>, <jonathan.derrick@intel.com>
Cc: <linux-nvme@lists.infradead.org>, <keith.busch@intel.com>,
	<axboe@fb.com>, <hch@lst.de>, <sagi@grimberg.me>,
	<linux-kernel@vger.kernel.org>, <mr.nuke.me@gmail.com>
Subject: Re: [PATCH] nvme-pci: Prevent mmio reads if pci channel offline
Date: Sun, 24 Feb 2019 20:37:30 +0000	[thread overview]
Message-ID: <2b7d8f45d11c47e69f56ad1bc3324dd1@ausx13mps321.AMER.DELL.COM> (raw)
In-Reply-To: CAHk-=wjmjHyovjtzaq=HSegEpiO2SXWaYfJ6qsJrZhXg_YSx5g@mail.gmail.com

On 2/22/19 3:29 PM, Linus Torvalds wrote:
> On Thu, Feb 21, 2019 at 5:07 PM Jon Derrick <jonathan.derrick@intel.com> wrote:
>>
>> Some platforms don't seem to easily tolerate non-posted mmio reads on
>> lost (hot removed) devices. This has been noted in previous
>> modifications to other layers where an mmio read to a lost device could
>> cause an undesired firmware intervention [1][2].
> 
> This is broken, and whatever platform that requires this is broken.
> 
> This has absolutely nothing to do with nvme, and should not be handled
> by a driver.
> 
> The platform code should be fixed.
> 
> What broken platform is this, and why is it causing problems?
> 
> None of this wishy-washy "some platforms". Name them, and let's get them fixed.

Dell r740xd to name one. r640 is even worse -- they probably didn't give 
me one because I'd have too much stuff to complain about.

On the above machines, firmware-first (FFS) tries to guess when there's 
a SURPRISE!!! removal of a PCIe card and supress any errors reported to 
the OS. When the OS keeps firing IO over the dead link, FFS doesn't know 
if it can safely supress the error. It reports is via NMI, and
drivers/acpi/apei/ghes.c panics whenever that happens.

Does this sound like horrible code?

As I see it, there's a more fundamental problem. As long as we accept 
platforms where firmware does some things first (FFS), we have much less 
control over what happens. The best we can do is wishy-washy fixes like 
this one.

Did I mention that FFS's explicit intent on the above machines is to 
make the OS crash?

Alex





  parent reply	other threads:[~2019-02-24 20:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22  1:05 [PATCH] nvme-pci: Prevent mmio reads if pci channel offline Jon Derrick
2019-02-22 21:28 ` Linus Torvalds
2019-02-22 21:59   ` Keith Busch
2019-02-24 20:37   ` Alex_Gagniuc [this message]
2019-02-24 22:42     ` Linus Torvalds
2019-02-24 23:27       ` Alex_Gagniuc
2019-02-25  0:43         ` Linus Torvalds
2019-02-25 15:55         ` Keith Busch
2019-02-26 22:37           ` Alex_Gagniuc
2019-02-27  1:01             ` Linus Torvalds
2019-02-27 16:42               ` Alex_Gagniuc
2019-02-27 17:51                 ` Keith Busch
2019-02-27 18:07                   ` Alex_Gagniuc
2019-02-27 17:55                 ` Austin.Bolen
2019-02-27 20:04                   ` Austin.Bolen
2019-02-28 14:16                     ` Christoph Hellwig
2019-02-28 23:10                       ` Austin.Bolen
2019-02-28 23:20                         ` Keith Busch
2019-02-28 23:43                           ` Austin.Bolen
2019-03-01  0:30                             ` Keith Busch
2019-03-01  1:52                               ` Austin.Bolen

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=2b7d8f45d11c47e69f56ad1bc3324dd1@ausx13mps321.AMER.DELL.COM \
    --to=alex_gagniuc@dellteam.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=jonathan.derrick@intel.com \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mr.nuke.me@gmail.com \
    --cc=sagi@grimberg.me \
    --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).