summaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-11-27 14:39:21 +1100
committerKevin Wolf <kwolf@redhat.com>2014-12-10 10:31:16 +0100
commitbe0677a93cd4578122955db3c377c3de7e81fcd0 (patch)
tree2ba804e40eadbfe400e140d4e561e86b5522275c /hw/block
parentd11032315ac652d9283ffada7f9b679f368ee175 (diff)
downloadqemu-be0677a93cd4578122955db3c377c3de7e81fcd0.tar.gz
nvme: 64kB page size fixes
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> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/nvme.c1
-rw-r--r--hw/block/nvme.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 13276589e4..aa1ed986d2 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 993c51131c..b6ccb655a6 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;