[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0cc93c56-57ba-42d7-8af9-348076e9d3ea.baolin.wang@linux.alibaba.com>
Date: Wed, 24 Jun 2020 14:22:24 +0800
From: "Baolin Wang" <baolin.wang@...ux.alibaba.com>
To: "Christoph Hellwig" <hch@....de>
Cc: "kbusch" <kbusch@...nel.org>, "axboe" <axboe@...com>,
"sagi" <sagi@...mberg.me>, "baolin.wang7" <baolin.wang7@...il.com>,
"linux-nvme" <linux-nvme@...ts.infradead.org>,
"linux-kernel" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] nvme-pci: Add controller memory buffer supported macro
> On Tue, Jun 23, 2020 at 06:27:51PM +0200, Christoph Hellwig wrote:
> > On Tue, Jun 23, 2020 at 09:24:33PM +0800, Baolin Wang wrote:
> > > Introduce a new capability macro to indicate if the controller
> > > supports the memory buffer or not, instead of reading the
> > > NVME_REG_CMBSZ register.
> >
> > This is a complex issue. The CMBS bit was only added in NVMe 1.4 as
> > a backwards incompatible change, as the CMB addressing scheme can lead
>
> Ah, right, I think I should add another version condition:
> if ((ctrl->vs >= NVME_VS(1, 4, 0) && !NVME_CAP_CMBS(dev->ctrl.cap)) ||
> dev->cmb_size)
> return;
After more thinking, now we should read NVME_REG_VS register to get the controller version
when using the CMBS bit in Capabilities register, there is no benefit, so I'll drop this patch. Thanks.
> > to data corruption. The CMBS was added as part of the horribe hack
> > that also involves the CBA field, which we'll need to see before
> > using it to work around the addressing issue. At the same time we
> > should also continue supporting the legacy pre-1.4 CMB with a warning
> > (and may reject it if we know we run in a VM).
Powered by blists - more mailing lists