All of lore.kernel.org
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: Keith Busch <kbusch@kernel.org>
Cc: Jinhao Fan <fanjinhao21s@ict.ac.cn>, qemu-devel@nongnu.org
Subject: Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support
Date: Mon, 27 Jun 2022 21:33:31 +0200	[thread overview]
Message-ID: <YroF+BS96Bd8b1Xq@apples> (raw)
In-Reply-To: <YroCVQvTq+z/mgc9@kbusch-mbp.dhcp.thefacebook.com>

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

On Jun 27 13:17, Keith Busch wrote:
> On Thu, Jun 16, 2022 at 08:34:07PM +0800, Jinhao Fan wrote:
> >      }
> >      sq->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, nvme_process_sq, sq);
> >  
> > +    if (n->dbbuf_enabled) {
> > +        sq->db_addr = n->dbbuf_dbs + (sqid << 3);
> > +        sq->ei_addr = n->dbbuf_eis + (sqid << 3);
> > +    }
> > +
> >      assert(n->cq[cqid]);
> >      cq = n->cq[cqid];
> >      QTAILQ_INSERT_TAIL(&(cq->sq_list), sq, entry);
> > @@ -4615,6 +4631,10 @@ static void nvme_init_cq(NvmeCQueue *cq, NvmeCtrl *n, uint64_t dma_addr,
> >      cq->head = cq->tail = 0;
> >      QTAILQ_INIT(&cq->req_list);
> >      QTAILQ_INIT(&cq->sq_list);
> > +    if (n->dbbuf_enabled) {
> > +        cq->db_addr = n->dbbuf_dbs + (cqid << 3) + (1 << 2);
> > +        cq->ei_addr = n->dbbuf_eis + (cqid << 3) + (1 << 2);
> > +    }
> >      n->cq[cqid] = cq;
> >      cq->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, nvme_post_cqes, cq);
> >  }
> 
> I just notice these address calculations changed from previous versions. What
> happened to taking the doorbell stride into account? Spec says the shadows and
> events follow the same stride spacing as the registers.

The stride is fixed at zero.

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

  reply	other threads:[~2022-06-27 19:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 12:34 [PATCH v3 0/2] hw/nvme: Add shadow doorbell buffer support Jinhao Fan
2022-06-16 12:34 ` [PATCH v3 1/2] hw/nvme: Implement " Jinhao Fan
2022-06-27 19:17   ` Keith Busch
2022-06-27 19:33     ` Klaus Jensen [this message]
2022-06-28  0:29       ` Jinhao Fan
2022-12-07 17:49   ` Guenter Roeck
2022-12-08  7:16     ` Klaus Jensen
2022-12-08  8:08       ` Klaus Jensen
2022-12-08 18:47         ` Guenter Roeck
2022-12-08 20:13           ` Guenter Roeck
2022-12-08 20:28             ` Keith Busch
2022-12-08 21:16               ` Guenter Roeck
2022-12-08 20:39             ` Guenter Roeck
2022-12-09 11:00               ` Guenter Roeck
2022-12-12  9:58               ` Klaus Jensen
2022-12-12 13:39                 ` Guenter Roeck
2022-12-12 13:45                   ` Klaus Jensen
2022-12-12 14:27                     ` Guenter Roeck
2022-12-12 15:18                       ` Klaus Jensen
2022-06-16 12:34 ` [PATCH v3 2/2] hw/nvme: Add trace events for shadow doorbell buffer Jinhao Fan
2022-06-17 11:54 ` [PATCH v3 0/2] hw/nvme: Add shadow doorbell buffer support Klaus Jensen
2022-06-17 12:47   ` Jinhao Fan
2022-06-17 12:56     ` Klaus Jensen
2022-06-17 13:02       ` Jinhao Fan
2022-06-17 20:35 ` Keith Busch
2022-06-27  6:00 ` Klaus Jensen

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=YroF+BS96Bd8b1Xq@apples \
    --to=its@irrelevant.dk \
    --cc=fanjinhao21s@ict.ac.cn \
    --cc=kbusch@kernel.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.