From: Klaus Jensen <its@irrelevant.dk>
To: Keith Busch <kbusch@kernel.org>
Cc: Jinhao Fan <fanjinhao21s@ict.ac.cn>,
John Levon <levon@movementarian.org>,
qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support
Date: Wed, 15 Jun 2022 10:48:26 +0200 [thread overview]
Message-ID: <Yqmc2vKXcMl4Xsme@apples> (raw)
In-Reply-To: <YqisK8iYANhY/mCm@kbusch-mbp.dhcp.thefacebook.com>
[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]
On Jun 14 08:41, Keith Busch wrote:
> It's a pretty nasty hack, and definitely not in compliance with the spec: the
> db_addr is supposed to be read-only from the device side, though I do think
> it's safe for this environment. Unless Klaus or anyone finds something I'm
> missing, I feel this is an acceptable compromise to address this odd
> discrepency.
>
No, I love this hack! :D
I have tested your hack against a dbbuf enabled driver that enables
shadow doorbells on the admin queue by default. I can confirm that this
works as well as on "broken" (or, lets call them "reasonable") drivers.
> By the way, I noticed that the patch never updates the cq's ei_addr value. Is
> that on purpose?
Yeah, I also mentioned this previously[1] and I still think we need to
update the event index. Otherwise (and my testing confirms this), we end
up in a situation where the driver skips the mmio, leaving a completion
queue entry "in use" on the device until some other completion comes
along.
I have folded these changes into a patch for testing[2]. Note, your
patch was missing equivalent changes in nvme_post_cqes(), so I added
that as well as updating of the event index.
[1]: https://lore.kernel.org/qemu-devel/YqEMwsclktptJvQI@apples/
[2]: http://git.infradead.org/qemu-nvme.git/commitdiff/60712930e441b684490a792b00ef6698cc85f116
Cheers,
Klaus
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-06-15 8:57 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
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 [this message]
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=Yqmc2vKXcMl4Xsme@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.