Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-12 Thread Klaus Jensen
On Dec 12 06:27, Guenter Roeck wrote: > On 12/12/22 05:45, Klaus Jensen wrote: > > On Dec 12 05:39, Guenter Roeck wrote: > > > On 12/12/22 01:58, Klaus Jensen wrote: > > > > On Dec 8 12:39, Guenter Roeck wrote: > > > > > On Thu, Dec 08, 2022 at 12:13:55PM -0800, Guenter Roeck wrote: > > > > > >

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-12 Thread Guenter Roeck
On 12/12/22 05:45, Klaus Jensen wrote: On Dec 12 05:39, Guenter Roeck wrote: On 12/12/22 01:58, Klaus Jensen wrote: On Dec 8 12:39, Guenter Roeck wrote: On Thu, Dec 08, 2022 at 12:13:55PM -0800, Guenter Roeck wrote: On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: A cq head

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-12 Thread Klaus Jensen
On Dec 12 05:39, Guenter Roeck wrote: > On 12/12/22 01:58, Klaus Jensen wrote: > > On Dec 8 12:39, Guenter Roeck wrote: > > > On Thu, Dec 08, 2022 at 12:13:55PM -0800, Guenter Roeck wrote: > > > > On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > > > > > > > > > > > > A cq head

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-12 Thread Guenter Roeck
On 12/12/22 01:58, Klaus Jensen wrote: On Dec 8 12:39, Guenter Roeck wrote: On Thu, Dec 08, 2022 at 12:13:55PM -0800, Guenter Roeck wrote: On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: A cq head doorbell mmio is skipped... And it is not the fault of the kernel. The kernel

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-12 Thread Klaus Jensen
On Dec 8 12:39, Guenter Roeck wrote: > On Thu, Dec 08, 2022 at 12:13:55PM -0800, Guenter Roeck wrote: > > On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > > > > > > > > A cq head doorbell mmio is skipped... And it is not the fault of the > > > > kernel. The kernel is in it's good

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-09 Thread Guenter Roeck
On Thu, Dec 08, 2022 at 12:39:57PM -0800, Guenter Roeck wrote: > On Thu, Dec 08, 2022 at 12:13:55PM -0800, Guenter Roeck wrote: > > On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > > > > > > > > A cq head doorbell mmio is skipped... And it is not the fault of the > > > > kernel.

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Guenter Roeck
On 12/8/22 12:28, Keith Busch wrote: When the request times out, the kernel should be printing the command ID. What does that say? The driver thinks the 0 is invalid, so I'm just curious what value it's expecting. After some time I see the following. ... [ 88.071197] nvme nvme0: invalid

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Guenter Roeck
On Thu, Dec 08, 2022 at 12:13:55PM -0800, Guenter Roeck wrote: > On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > > > > > > A cq head doorbell mmio is skipped... And it is not the fault of the > > > kernel. The kernel is in it's good right to skip the mmio since the cq > > >

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Keith Busch
When the request times out, the kernel should be printing the command ID. What does that say? The driver thinks the 0 is invalid, so I'm just curious what value it's expecting. On Thu, Dec 8, 2022, 8:13 PM Guenter Roeck wrote: > On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > >

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Guenter Roeck
On Thu, Dec 08, 2022 at 10:47:42AM -0800, Guenter Roeck wrote: > > > > A cq head doorbell mmio is skipped... And it is not the fault of the > > kernel. The kernel is in it's good right to skip the mmio since the cq > > eventidx is not properly updated. > > > > Adding that and it boots properly

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Guenter Roeck
On Thu, Dec 08, 2022 at 09:08:12AM +0100, Klaus Jensen wrote: > On Dec 8 08:16, Klaus Jensen wrote: > > On Dec 7 09:49, Guenter Roeck wrote: > > > Hi, > > > > > > On Thu, Jun 16, 2022 at 08:34:07PM +0800, Jinhao Fan wrote: > > > > Implement Doorbel Buffer Config command (Section 5.7 in NVMe

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-08 Thread Klaus Jensen
On Dec 8 08:16, Klaus Jensen wrote: > On Dec 7 09:49, Guenter Roeck wrote: > > Hi, > > > > On Thu, Jun 16, 2022 at 08:34:07PM +0800, Jinhao Fan wrote: > > > Implement Doorbel Buffer Config command (Section 5.7 in NVMe Spec 1.3) > > > and Shadow Doorbel buffer & EventIdx buffer handling logic

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-07 Thread Klaus Jensen
On Dec 7 09:49, Guenter Roeck wrote: > Hi, > > On Thu, Jun 16, 2022 at 08:34:07PM +0800, Jinhao Fan wrote: > > Implement Doorbel Buffer Config command (Section 5.7 in NVMe Spec 1.3) > > and Shadow Doorbel buffer & EventIdx buffer handling logic (Section 7.13 > > in NVMe Spec 1.3). For queues

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-12-07 Thread Guenter Roeck
Hi, On Thu, Jun 16, 2022 at 08:34:07PM +0800, Jinhao Fan wrote: > Implement Doorbel Buffer Config command (Section 5.7 in NVMe Spec 1.3) > and Shadow Doorbel buffer & EventIdx buffer handling logic (Section 7.13 > in NVMe Spec 1.3). For queues created before the Doorbell Buffer Config > command,

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-27 Thread Jinhao Fan
> On Jun 28, 2022, at 3:33 AM, Klaus Jensen wrote: > > 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) { >>> +

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-27 Thread Klaus Jensen
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); > > +

Re: [PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-27 Thread Keith Busch
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); > +} > + >

[PATCH v3 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-16 Thread Jinhao Fan
Implement Doorbel Buffer Config command (Section 5.7 in NVMe Spec 1.3) and Shadow Doorbel buffer & EventIdx buffer handling logic (Section 7.13 in NVMe Spec 1.3). For queues created before the Doorbell Buffer Config command, the nvme_dbbuf_config function tries to associate each existing SQ and CQ