All of lore.kernel.org
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: John Levon <levon@movementarian.org>
Cc: Keith Busch <kbusch@kernel.org>,
	Jinhao Fan <fanjinhao21s@ict.ac.cn>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support
Date: Thu, 9 Jun 2022 19:27:57 +0200	[thread overview]
Message-ID: <YqItnbgtw7BNPBZH@apples> (raw)
In-Reply-To: <YqIXIiQr+dpksBh6@movementarian.org>

[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]

On Jun  9 16:52, John Levon wrote:
> On Thu, Jun 09, 2022 at 08:29:30AM -0600, Keith Busch wrote:
> 
> > On Wed, Jun 08, 2022 at 10:55:30PM +0200, Klaus Jensen wrote:
> > > 
> > > Keith, is this a bug in the kernel? If the code here would expect the
> > > doorbell buffer to be updated for the admin queue as well, would we
> > > break?
> > 
> > The admin queue has to be created before db buffer can be set up, so we can't
> > rely on it. And this is a performance feature. Admin commands have never been
> > considered performant, so we decided not to consider it though the spec allows
> > it.

It's not really a question of whether or not the spec *allows* it. If
our device chooses to be compliant here, then it will read invalid
doorbell values if drivers doesnt update the admin doorbell buffer.

> 
> It's not just unnecessary, but enabling shadow doorbells on admin queues will
> actively break device implementations (such as SPDK), which have had to presume
> that driver implementations don't use shadow doorbells for the admin queue.
> 

I'm ok with following the concensus here, but we all agree that this is
a blatant spec violation that ended up manifesting itself down the
stack, right?

So... if QEMU wants to be compliant here, I guess we could ask the
kernel to introduce a quirk for *compliant* controllers. Now, THAT would
be a first! Not sure if I am being serious or not here ;)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-06-09 19:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08  1:36 [PATCH 0/2] hw/nvme: Add shadow doorbell buffer support Jinhao Fan
2022-06-08  1:36 ` [PATCH 1/2] hw/nvme: Implement " Jinhao Fan
2022-06-08 20:55   ` Klaus Jensen
2022-06-09  1:49     ` Jinhao Fan
2022-06-09 14:29     ` Keith Busch
2022-06-09 15:52       ` John Levon
2022-06-09 17:27         ` Klaus Jensen [this message]
2022-06-09 17:50           ` John Levon
2022-06-12 11:40           ` Jinhao Fan
2022-06-13 21:15             ` Keith Busch
2022-06-14  7:24               ` Jinhao Fan
2022-06-14 15:41                 ` Keith Busch
2022-06-15  3:58                   ` Jinhao Fan
2022-06-15  9:38                     ` Klaus Jensen
2022-06-15 14:52                       ` Jinhao Fan
2022-06-15  8:48                   ` Klaus Jensen
2022-06-15  9:07                     ` John Levon
2022-06-15  9:33                       ` Klaus Jensen
2022-06-15 10:11                         ` John Levon
2022-06-15 11:22                           ` Jinhao Fan
2022-06-15 11:45                             ` John Levon
2022-06-08  1:36 ` [PATCH 2/2] hw/nvme: Add trace events for shadow doorbell buffer Jinhao Fan

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=YqItnbgtw7BNPBZH@apples \
    --to=its@irrelevant.dk \
    --cc=fanjinhao21s@ict.ac.cn \
    --cc=kbusch@kernel.org \
    --cc=levon@movementarian.org \
    --cc=qemu-devel@nongnu.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.