linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Alan Adamson <alan.adamson@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"axboe@fb.com" <axboe@fb.com>,
	"sagi@grimberg.me" <sagi@grimberg.me>
Subject: Re: [PATCH 0/1] nvme: Export CSTS register via sysfs
Date: Sat, 20 Mar 2021 02:30:09 +0900	[thread overview]
Message-ID: <20210319173009.GA4198@redsun51.ssa.fujisawa.hgst.com> (raw)
In-Reply-To: <49CFFA55-5A71-4C0D-8816-11EB88087AAA@oracle.com>

On Fri, Mar 19, 2021 at 05:21:22PM +0000, Alan Adamson wrote:
> 
> 
> > On Mar 19, 2021, at 8:30 AM, Christoph Hellwig <hch@lst.de> wrote:
> > 
> > On Sat, Mar 20, 2021 at 12:22:08AM +0900, Keith Busch wrote:
> >>> I think this is a horrible idea.  Userspace has no business touching
> >>> registers even read-only.  MMIO reads can have side effects as well,
> >>> intentional or unintentional, and we also open up a whole can of worms
> >>> of mismatched memory attributes.
> >> 
> >> I was thinking the driver wouldn't opt-in if there were read side
> >> effects, but yeah, it's too fragile. I withdraw the suggestion.
> > 
> > I'd still like to understand what values in CSTS Alan cares about.  I
> > don't think just dumping a register with somewhat awkward encodings
> > is a good idea.
> 
> Primarily Ready and Failed. I’m reaching out to the requesting team to see if the ’state’ attribute is sufficient.
> 
> Back to nvme-cli show-regs, do we just expect this to always fail now our should we be returning good
> values?

For PCIe, that shell command returns good values only if the kernel
wasn't compiled with CONFIG_IO_STRICT_DEVMEM. If the kernel was compiled
with that option (most are), user space will not be able to access the
values.

Fabrics should always work, though, because we retrieve CSTS through an
admin command rather than memory mapped IO.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2021-03-19 17:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 20:46 [PATCH 0/1] nvme: Export CSTS register via sysfs Alan Adamson
2021-03-17 20:46 ` [PATCH 1/1] " Alan Adamson
2021-03-18  1:06 ` [PATCH 0/1] " Chaitanya Kulkarni
2021-03-18  4:38 ` Christoph Hellwig
2021-03-18 14:19   ` Keith Busch
2021-03-18 16:28   ` Alan Adamson
2021-03-18 16:52     ` Keith Busch
2021-03-18 18:39       ` Alan Adamson
2021-03-18 19:46         ` Keith Busch
2021-03-19  6:51           ` Christoph Hellwig
2021-03-19 15:22             ` Keith Busch
2021-03-19 15:30               ` Christoph Hellwig
2021-03-19 17:21                 ` Alan Adamson
2021-03-19 17:30                   ` Keith Busch [this message]
2021-03-19 17:33                     ` Alan Adamson
2021-05-05 18:40                     ` Alan Adamson
2021-05-05 20:11                       ` Keith Busch
2021-05-05 20:23                         ` Alan Adamson
2021-05-05 20:35                           ` Keith Busch
2021-03-18 19:15       ` Chaitanya Kulkarni

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=20210319173009.GA4198@redsun51.ssa.fujisawa.hgst.com \
    --to=kbusch@kernel.org \
    --cc=alan.adamson@oracle.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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).