* [Qemu-devel] [PATCH] nvme: 64kB page size fixes @ 2014-11-27 3:39 Anton Blanchard 2014-12-02 15:04 ` Stefan Hajnoczi 2014-12-02 20:18 ` Paolo Bonzini 0 siblings, 2 replies; 5+ messages in thread From: Anton Blanchard @ 2014-11-27 3:39 UTC (permalink / raw) To: Keith Busch, Kevin Wolf, Stefan Hajnoczi; +Cc: qemu-devel Initialise our maximum page size capability to 64kB and increase the page_size variable from 16 to 32 bits. Signed-off-by: Anton Blanchard <anton@samba.org> -- diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 1327658..aa1ed98 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -811,6 +811,7 @@ static int nvme_init(PCIDevice *pci_dev) NVME_CAP_SET_AMS(n->bar.cap, 1); NVME_CAP_SET_TO(n->bar.cap, 0xf); NVME_CAP_SET_CSS(n->bar.cap, 1); + NVME_CAP_SET_MPSMAX(n->bar.cap, 4); n->bar.vs = 0x00010001; n->bar.intmc = n->bar.intms = 0; diff --git a/hw/block/nvme.h b/hw/block/nvme.h index 993c511..b6ccb65 100644 --- a/hw/block/nvme.h +++ b/hw/block/nvme.h @@ -688,7 +688,7 @@ typedef struct NvmeCtrl { NvmeBar bar; BlockConf conf; - uint16_t page_size; + uint32_t page_size; uint16_t page_bits; uint16_t max_prp_ents; uint16_t cqe_size; ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] nvme: 64kB page size fixes 2014-11-27 3:39 [Qemu-devel] [PATCH] nvme: 64kB page size fixes Anton Blanchard @ 2014-12-02 15:04 ` Stefan Hajnoczi 2014-12-02 15:17 ` Kevin Wolf 2014-12-02 20:18 ` Paolo Bonzini 1 sibling, 1 reply; 5+ messages in thread From: Stefan Hajnoczi @ 2014-12-02 15:04 UTC (permalink / raw) To: Anton Blanchard; +Cc: Keith Busch, Kevin Wolf, qemu-devel [-- Attachment #1: Type: text/plain, Size: 458 bytes --] On Thu, Nov 27, 2014 at 02:39:21PM +1100, Anton Blanchard wrote: > Initialise our maximum page size capability to 64kB and increase > the page_size variable from 16 to 32 bits. > > Signed-off-by: Anton Blanchard <anton@samba.org> > -- Covered in NVM Express 1.1 specification "3.1.1 Offset 00h: CAP - Controller Capabilities". http://www.nvmexpress.org/wp-content/uploads/NVM-Express-1_1.pdf Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> [-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] nvme: 64kB page size fixes 2014-12-02 15:04 ` Stefan Hajnoczi @ 2014-12-02 15:17 ` Kevin Wolf 0 siblings, 0 replies; 5+ messages in thread From: Kevin Wolf @ 2014-12-02 15:17 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: Keith Busch, Anton Blanchard, qemu-devel [-- Attachment #1: Type: text/plain, Size: 582 bytes --] Am 02.12.2014 um 16:04 hat Stefan Hajnoczi geschrieben: > On Thu, Nov 27, 2014 at 02:39:21PM +1100, Anton Blanchard wrote: > > Initialise our maximum page size capability to 64kB and increase > > the page_size variable from 16 to 32 bits. > > > > Signed-off-by: Anton Blanchard <anton@samba.org> > > -- > > Covered in NVM Express 1.1 specification "3.1.1 Offset 00h: CAP - > Controller Capabilities". > http://www.nvmexpress.org/wp-content/uploads/NVM-Express-1_1.pdf > > Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Thanks, applied to block-next. Kevin [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] nvme: 64kB page size fixes 2014-11-27 3:39 [Qemu-devel] [PATCH] nvme: 64kB page size fixes Anton Blanchard 2014-12-02 15:04 ` Stefan Hajnoczi @ 2014-12-02 20:18 ` Paolo Bonzini 2014-12-09 15:27 ` Stefan Hajnoczi 1 sibling, 1 reply; 5+ messages in thread From: Paolo Bonzini @ 2014-12-02 20:18 UTC (permalink / raw) To: Anton Blanchard, Keith Busch, Kevin Wolf, Stefan Hajnoczi; +Cc: qemu-devel On 27/11/2014 04:39, Anton Blanchard wrote: > Initialise our maximum page size capability to 64kB and increase > the page_size variable from 16 to 32 bits. > > Signed-off-by: Anton Blanchard <anton@samba.org> > -- > > diff --git a/hw/block/nvme.c b/hw/block/nvme.c > index 1327658..aa1ed98 100644 > --- a/hw/block/nvme.c > +++ b/hw/block/nvme.c > @@ -811,6 +811,7 @@ static int nvme_init(PCIDevice *pci_dev) > NVME_CAP_SET_AMS(n->bar.cap, 1); > NVME_CAP_SET_TO(n->bar.cap, 0xf); > NVME_CAP_SET_CSS(n->bar.cap, 1); > + NVME_CAP_SET_MPSMAX(n->bar.cap, 4); > > n->bar.vs = 0x00010001; > n->bar.intmc = n->bar.intms = 0; > diff --git a/hw/block/nvme.h b/hw/block/nvme.h > index 993c511..b6ccb65 100644 > --- a/hw/block/nvme.h > +++ b/hw/block/nvme.h > @@ -688,7 +688,7 @@ typedef struct NvmeCtrl { > NvmeBar bar; > BlockConf conf; > > - uint16_t page_size; > + uint32_t page_size; > uint16_t page_bits; > uint16_t max_prp_ents; > uint16_t cqe_size; > > This should probably be a property of the device instead. If you want to change the default, you need to preserve a backwards-compatible value for pre-2.3 machine types (-M pc-i440fx-2.2, -M pc-i440fx-2.1 etc.). Paolo ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] nvme: 64kB page size fixes 2014-12-02 20:18 ` Paolo Bonzini @ 2014-12-09 15:27 ` Stefan Hajnoczi 0 siblings, 0 replies; 5+ messages in thread From: Stefan Hajnoczi @ 2014-12-09 15:27 UTC (permalink / raw) To: Paolo Bonzini Cc: Keith Busch, Kevin Wolf, Anton Blanchard, Stefan Hajnoczi, qemu-devel [-- Attachment #1: Type: text/plain, Size: 1800 bytes --] On Tue, Dec 02, 2014 at 09:18:59PM +0100, Paolo Bonzini wrote: > > > On 27/11/2014 04:39, Anton Blanchard wrote: > > Initialise our maximum page size capability to 64kB and increase > > the page_size variable from 16 to 32 bits. > > > > Signed-off-by: Anton Blanchard <anton@samba.org> > > -- > > > > diff --git a/hw/block/nvme.c b/hw/block/nvme.c > > index 1327658..aa1ed98 100644 > > --- a/hw/block/nvme.c > > +++ b/hw/block/nvme.c > > @@ -811,6 +811,7 @@ static int nvme_init(PCIDevice *pci_dev) > > NVME_CAP_SET_AMS(n->bar.cap, 1); > > NVME_CAP_SET_TO(n->bar.cap, 0xf); > > NVME_CAP_SET_CSS(n->bar.cap, 1); > > + NVME_CAP_SET_MPSMAX(n->bar.cap, 4); > > > > n->bar.vs = 0x00010001; > > n->bar.intmc = n->bar.intms = 0; > > diff --git a/hw/block/nvme.h b/hw/block/nvme.h > > index 993c511..b6ccb65 100644 > > --- a/hw/block/nvme.h > > +++ b/hw/block/nvme.h > > @@ -688,7 +688,7 @@ typedef struct NvmeCtrl { > > NvmeBar bar; > > BlockConf conf; > > > > - uint16_t page_size; > > + uint32_t page_size; > > uint16_t page_bits; > > uint16_t max_prp_ents; > > uint16_t cqe_size; > > > > > > This should probably be a property of the device instead. If you want > to change the default, you need to preserve a backwards-compatible value > for pre-2.3 machine types (-M pc-i440fx-2.2, -M pc-i440fx-2.1 etc.). Hi Anton, Any update on this? Paolo has a point that changing this value would make a guest-visible hardware change. Therefore older machine types, which users might rely on, should continue to show the old value. This is especially important with live migration because hardware should not change underneath the guest due to migration. Stefan [-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-09 15:28 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-27 3:39 [Qemu-devel] [PATCH] nvme: 64kB page size fixes Anton Blanchard 2014-12-02 15:04 ` Stefan Hajnoczi 2014-12-02 15:17 ` Kevin Wolf 2014-12-02 20:18 ` Paolo Bonzini 2014-12-09 15:27 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).