er_nodes(void)
&(QOSGraphTestOptions) {
.edge.extra_device_opts = "pmrdev=pmr0"
});
+
+qos_add_test("reg-read", "nvme", nvmetest_reg_read_test, NULL);
}
libqos_init(nvme_register_nodes);
--
2.32.0
Reviewed-by: Gollu Appalanaidu
made it to persistent media
*/
-if (addr == 0xe08 &&
+if (addr == NVME_REG_PMRSTS &&
(NVME_PMRCAP_PMRWBM(n->bar.pmrcap) & 0x02)) {
memory_region_msync(&n->pmr.dev->mr, 0, n->pmr.dev->size);
}
--
2.32.0
LGTM.
Reviewed-by : Gollu Appalanaidu
;
@@ -5936,7 +5937,7 @@ static void nvme_write_bar(NvmeCtrl *n, hwaddr offset,
uint64_t data,
return;
}
-n->bar.pmrmsc = (n->bar.pmrmsc & 0x) | (data << 32);
+ n->bar.pmrmscu = data & 0x;
return;
default:
NVME_GUEST_ERR(pci_nvme_ub_mmiowr_invalid,
--
2.32.0
Changes LGTM.
Reviewed-by: Gollu Appalanaidu
On Tue, Jul 13, 2021 at 07:43:59AM +0200, Klaus Jensen wrote:
From: Klaus Jensen
The new PMR test unearthed a long-standing issue with MMIO reads on
big-endian hosts.
Fix by using the ldn_he_p helper instead of memcpy.
Cc: Gollu Appalanaidu
Reported-by: Peter Maydell
Signed-off-by: Klaus
This will test the PMR functionality.
Signed-off-by: Gollu Appalanaidu
---
tests/qtest/nvme-test.c | 78 -
1 file changed, 77 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/nvme-test.c b/tests/qtest/nvme-test.c
index d32c953a38..6d557be6ca 100644
condition if there is no Subsystem return invalid field in
command.
Signed-off-by: Gollu Appalanaidu
-v3:
Added condition if there is no Subsystem return invalid field in
command
-v2:
Fix the review comments from Klaus and squashed 2nd commit into
1st commit
---
hw/nvme/ctrl.c | 26
In the documentation of the '-detached' param "be" and "not" has been
used side by side, fix that.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index d513b022
On Wed, Jun 09, 2021 at 10:22:49PM +0200, Klaus Jensen wrote:
On Jun 1 20:32, Gollu Appalanaidu wrote:
Add the controller identifiers list CNS 0x13, available list of ctrls
in NVM Subsystem that may or may not be attached to namespaces.
In Identify Ctrl List of the CNS 0x12 and 0x13 no endian
Add a test case for reading an NVMe Boot Partition without
enabling the controller.
Signed-off-by: Gollu Appalanaidu
---
tests/qtest/nvme-test.c | 118 +++-
1 file changed, 117 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/nvme-test.c b/tests/qtest
Add the controller identifiers list CNS 0x13, available list of ctrls
in NVM Subsystem that may or may not be attached to namespaces.
In Identify Ctrl List of the CNS 0x12 and 0x13 no endian conversion
for the nsid field.
Signed-off-by: Gollu Appalanaidu
-v2:
Fix the review comments from
-v2:
Boot partitions write and read offset corrections
This series adds the boot partition feature as well test case for
reading boot partition area.
Gollu Appalanaidu (2):
hw/nvme: add support for boot partiotions
tests/qtest/nvme-test: add boot partition read test
hw/nvme/ctrl.c
well as support
for updating the boot partition contents from the host through the
FW Download and Commit commands.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 207 +++
hw/nvme/nvme.h | 3 +
hw/nvme/trace-events | 7 ++
include
In the documentation of the '-detached' param "be" and "not" has been
used side by side, fix that.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index 813a72c6
On Fri, May 21, 2021 at 09:13:51AM +0200, Klaus Jensen wrote:
On May 21 11:38, Gollu Appalanaidu wrote:
Identify command related functions style fix.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/nvme/ctrl.c b
Add a test case for reading an NVMe Boot Partition without
enabling the controller.
Signed-off-by: Gollu Appalanaidu
---
tests/qtest/nvme-test.c | 118 +++-
1 file changed, 117 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/nvme-test.c b/tests/qtest
well as support
for updating the boot partition contents from the host through the
FW Download and Commit commands.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 200 +++
hw/nvme/nvme.h | 3 +
hw/nvme/trace-events | 7 ++
include
This series adds the boot partition feature as well test case for
reading boot partition area.
Gollu Appalanaidu (2):
hw/nvme: add support for boot partiotions
tests/qtest/nvme-test: add boot partition read test
hw/nvme/ctrl.c | 200
hw/nvme
Identify command related functions style fix.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index 0bcaf7192f..40a7efcea9 100644
--- a/hw/nvme/ctrl.c
+++ b/hw/nvme/ctrl.c
@@ -4291,7
This series will add the Identify Controller List (CNS 0x13) support
and NSID endian conversion fixes for CNS 0x12 and CNS 0x13.
Documentation fix for the '-detached' parameter.
Gollu Appalanaidu (3):
hw/nvme/ctrl: add controller list cns 0x13
hw/nvme/ctrl: fix endian conversion f
In the documentation of the '-detached' param "be" and "not" has been
used side by side, fix that.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index 813a72c6
In Identify Ctrl List of the CNS 0x12 and 0x13 no endian conversion
for the nsid field.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index d08a3350e2..813a72c655 100644
--- a/hw
Add the controller identifiers list available in NVM Subsystem
that may or may not be attached to namespaces.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 25 +++--
hw/nvme/trace-events | 2 +-
include/block/nvme.h | 1 +
3 files changed, 17 insertions
ces.
Suggested-by: Klaus Jensen
Signed-off-by: Gollu Appalanaidu
---
-v2: add sugggestions from Klaus
We can Remove 'nvme_csi_has_nvm_support()' helper, we can
assume NVM command set support for all namespaces.
hw/nvme/ctrl.c | 14 ++
1 file changed, 2 insertions(+), 12 d
On Mon, Apr 26, 2021 at 01:03:04PM +0200, Klaus Jensen wrote:
On Apr 26 13:16, Gollu Appalanaidu wrote:
As per the TP 4056d Namespace types CNS 0x00 and CNS 0x11
CSI field shouldn't use but it is being used for these two
Identify command CNS values, fix that.
Signed-off-by: Gollu Appala
As per the TP 4056d Namespace types CNS 0x00 and CNS 0x11
CSI field shouldn't use but it is being used for these two
Identify command CNS values, fix that.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/hw
Add Idnetify Namespace Metadata Capablities (MC) enum.
Signed-off-by: Gollu Appalanaidu
---
hw/block/nvme-ns.c | 2 +-
include/block/nvme.h | 5 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c
index 9065a7ae99..db75302136 100644
Add the Identify Namespace FLBAS related enums and remove
NVME_ID_NS_FLBAS_EXTENDEND macro its being used in only
one place and converted into enum.
Signed-off-by: Gollu Appalanaidu
---
hw/block/nvme-ns.c | 2 +-
hw/block/nvme-ns.h | 2 +-
include/block/nvme.h | 5 -
3 files changed, 6
d-only.
Reviewed-by: Klaus Jensen
Signed-off-by: Gollu Appalanaidu
---
hw/block/nvme-ns.c | 51 --
1 file changed, 22 insertions(+), 29 deletions(-)
diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c
index 7bb618f182..ae56142fcd 100644
--- a/hw/block/nvme
This series fixes the LBAF Formats intialization and Adds the
Identify Namespace Parameters enums to make to more readable.
Gollu Appalanaidu (3):
hw/block/nvme: fix lbaf formats initialization
hw/block/nvme: add id ns flbas enum
hw/block/nvme: add id ns metadata cap (mc) enum
hw/block
On Tue, Apr 20, 2021 at 09:47:00PM +0200, Klaus Jensen wrote:
On Apr 16 17:29, Gollu Appalanaidu wrote:
Currently LBAF formats are being intialized based on metadata
size if and only if nvme-ns "ms" parameter is non-zero value.
Since FormatNVM command being supported device paramete
nvme_map_addr_pmr function arguments not aligned, fix that.
Signed-off-by: Gollu Appalanaidu
---
hw/block/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 624a1431d0..63ceeb47bd 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
explicitly.
Signed-off-by: Gollu Appalanaidu
---
hw/block/nvme.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 624a1431d0..b5d2c29fc4 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -185,6 +185,7 @@ static const bool
Currently LBAF formats are being intialized based on metadata
size if and only if nvme-ns "ms" parameter is non-zero value.
Since FormatNVM command being supported device parameter "ms"
may not be the criteria to initialize the supported LBAFs.
Signed-off-by: Gollu Appalana
Currently LBAF formats are being intialized based on metadata
size if and only if nvme-ns "ms" parameter is non-zero value.
Since FormatNVM command being supported device parameter "ms"
may not be the criteria to initialize the supported LBAFs.
Signed-off-by: Gollu A
On Fri, Apr 16, 2021 at 10:48:16AM +0200, Klaus Jensen wrote:
On Apr 16 12:52, Gollu Appalanaidu wrote:
Currently LBAF formats are being intialized based on metadata
size if and only if nvme-ns "ms" parameter is non-zero value.
Since FormatNVM command being supported device paramete
Currently in compare command metadata aio read blk_aio_preadv return
value ignored, consider it and complete the block accounting.
Signed-off-by: Gollu Appalanaidu
---
hw/block/nvme.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index
Currently LBAF formats are being intialized based on metadata
size if and only if nvme-ns "ms" parameter is non-zero value.
Since FormatNVM command being supported device parameter "ms"
may not be the criteria to initialize the supported LBAFs.
Signed-off-by: Gollu Appalanaidu
Use lower case hexadecimal format for the constants and in
comments use the same format as used in Spec. ("h")
Signed-off-by: Gollu Appalanaidu
---
-v3: Add Suggestions (Philippe)
Describe the NVMe subsystem style in nvme.c header
-v2: Address review comments (Klaus)
use
On Thu, Apr 15, 2021 at 07:18:50PM +0200, Klaus Jensen wrote:
On Apr 15 15:13, Philippe Mathieu-Daudé wrote:
On 4/15/21 2:00 PM, Gollu Appalanaidu wrote:
Make uniform hexadecimal numbers format.
Signed-off-by: Gollu Appalanaidu
---
-v2: Address review comments (Klaus)
use lower case hexa
Make uniform hexadecimal numbers format.
Signed-off-by: Gollu Appalanaidu
---
-v2: Address review comments (Klaus)
use lower case hexa format for the code and in comments
use the same format as used in Spec. ("h")
hw/block/nvme-ns.c | 2 +-
hw/block/nvme.c
Currently pci_nvme_err_invalid_lba_range tace being called indvidually
at each function, add this in nvme_check_bounds and remove redundant
usage of it.
Signed-off-by: Gollu Appalanaidu
---
hw/block/nvme.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/hw/block
On Mon, Apr 12, 2021 at 01:57:49PM +0530, Gollu Appalanaidu wrote:
On Sat, Apr 10, 2021 at 12:35:20AM +0900, Keith Busch wrote:
On Wed, Mar 31, 2021 at 02:54:27PM +0530, Gollu Appalanaidu wrote:
This is to add support for Device Self Test Command (DST) and
DST Log Page. Refer NVM Express
6a942 ("hw/block/nvme: zero out zones on reset")
Fixes: 2605257a26b8 ("hw/block/nvme: add the dataset management command")
Cc: Gollu Appalanaidu
Cc: Minwoo Im
Signed-off-by: Klaus Jensen
---
hw/block/nvme.c | 23 +--
1 file changed, 21 insertions(+), 2 deleti
On Thu, Apr 08, 2021 at 09:37:08PM +0200, Klaus Jensen wrote:
From: Klaus Jensen
nvme_compare() fails to store the aiocb from the blk_aio_preadv() call.
Fix this.
Fixes: 0a384f923f51 ("hw/block/nvme: add compare command")
Cc: Gollu Appalanaidu
Signed-off-by: Klaus Jensen
---
hw/bl
NSZE is the total size of the namespace in logical blocks. So the max
addressable logical block is NLB minus 1. So your starting logical
block is equal to NSZE it is a out of range.
Signed-off-by: Gollu Appalanaidu
---
hw/block/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
ns(+), 172 deletions(-)
--
Reviewed-by: Gollu Appalanaidu
2.31.0
@@ -6218,13 +6176,11 @@ static void nvme_realize(PCIDevice *pci_dev, Error
**errp)
ns = &n->namespace;
ns->params.nsid = 1;
-if (nvme_ns_setup(ns, errp)) {
+if (nvme_ns_setup(n, ns, errp)) {
return;
}
-if (nvme_register_namespace(n, ns, errp)) {
-return;
-}
+nvme_attach_ns(n, ns);
}
}
diff --git a/hw/block/trace-events b/hw/block/trace-events
index 22da06986d72..fa12e3a67a75 100644
--- a/hw/block/trace-events
+++ b/hw/block/trace-events
@@ -51,7 +51,6 @@ hd_geometry_guess(void *blk, uint32_t cyls, uint32_t heads,
uint32_t secs, int t
# nvme.c
# nvme traces for successful events
-pci_nvme_register_namespace(uint32_t nsid) "nsid %"PRIu32""
pci_nvme_irq_msix(uint32_t vector) "raising MSI-X IRQ vector %u"
pci_nvme_irq_pin(void) "pulsing IRQ pin"
pci_nvme_irq_masked(void) "IRQ is masked"
--
Changes looks good to me.
Reviewed-by: Gollu Appalanaidu
2.31.0
This is to add support for Device Self Test Command (DST) and
DST Log Page. Refer NVM Express specification 1.4b section 5.8
("Device Self-test command")
Signed-off-by: Gollu Appalanaidu
---
changes:
-v3: removed unwanted patch file added
-v2: addressed style fixes in hw/block/n
This is to add support for Device Self Test Command (DST) and
DST Log Page. Refer NVM Express specification 1.4b section 5.8
("Device Self-test command")
Signed-off-by: Gollu Appalanaidu
---
changes:
-v2: addressed style fixes in hw/block/nvme.h
hw/bl
This is to add support for Device Self Test Command (DST) and
DST Log Page. Refer NVM Express specification 1.4b section 5.8
("Device Self-test command")
Signed-off-by: Gollu Appalanaidu
---
hw/block/nvme.c | 118 +-
hw/block/nvme.h
**errp)
params->max_ioqpairs = params->num_queues - 1;
}
-if (n->conf.blk) {
+if (n->namespace.blkconf.blk) {
warn_report("drive property is deprecated; "
"please use an nvme-ns device instead");
}
--
2.31.0
Reviewed-by: Gollu Appalanaidu
,
NvmeRequest *req)
}
nvme_ns_detach(ctrl, ns);
+
+__nvme_update_dmrsl(ctrl);
}
/*
--
2.31.0
Reviwed-by: Gollu Appalanaidu
On Tue, Mar 30, 2021 at 09:24:59AM +0200, Klaus Jensen wrote:
On Mar 29 19:52, Gollu Appalanaidu wrote:
On Wed, Mar 24, 2021 at 09:09:01PM +0100, Klaus Jensen wrote:
> From: Klaus Jensen
>
> Protection Information can only be enabled if there is at least 8 bytes
> of metadata.
&g
t;;
default:return "NVME_ADM_CMD_UNKNOWN";
}
--
Reviewed-by: Gollu Appalanaidu
2.31.0
On Wed, Mar 24, 2021 at 09:09:01PM +0100, Klaus Jensen wrote:
From: Klaus Jensen
Protection Information can only be enabled if there is at least 8 bytes
of metadata.
Signed-off-by: Klaus Jensen
---
hw/block/nvme-ns.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/
unt)--;
+if (--(*count)) {
+return NVME_NO_COMPLETE;
+}
-return NVME_NO_COMPLETE;
+g_free(count);
+ns->status = 0x0;
+(*num_formats)--;
+
+return NVME_SUCCESS;
}
Reviewed-by: Gollu Appalanaidu
static uint16_t nvme_format(NvmeCtrl *n, NvmeRequest *req)
--
2.31.0
nvme-dif.c
@@ -432,7 +432,7 @@ uint16_t nvme_dif_rw(NvmeCtrl *n, NvmeRequest *req)
status = nvme_map_dptr(n, &req->sg, mapped_len, &req->cmd);
if (status) {
-return status;
+goto err;
Looks good to me.
}
ctx->data.bounce = g_malloc(len);
--
Reviewed-by: Gollu Appalanaidu
2.31.0
Align the Reserved fields declaration in NvmeBar
Signed-off-by: Gollu Appalanaidu
---
include/block/nvme.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/block/nvme.h b/include/block/nvme.h
index fc65cfcb01..e5bd00bb85 100644
--- a/include/block/nvme.h
+++ b/include
Make uniform hexadecimal numbers format.
Signed-off-by: Gollu Appalanaidu
---
hw/block/nvme.c | 30 +++---
include/block/nvme.h | 10 +-
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index d439e44db8
59 matches
Mail list logo