[PATCH v3 1/2] hw/nvme: fix endianess conversion and add controller list

2021-06-14 Thread Gollu Appalanaidu
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

[PATCH v3 2/2] hw/nvme: documentation fix

2021-06-14 Thread Gollu Appalanaidu
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 d513b022c4..21883e

Re: [PATCH v2 1/2] hw/nvme: fix endianess conversion and add controller list

2021-06-13 Thread Gollu Appalanaidu
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

[PATCH] tests/qtest/nvme-test: add persistent memory region test

2021-06-18 Thread Gollu Appalanaidu
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

[PATCH 2/3] hw/nvme/ctrl: fix endian conversion for nsid in ctrl list

2021-05-17 Thread Gollu Appalanaidu
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

[PATCH 1/3] hw/nvme/ctrl: add controller list cns 0x13

2021-05-17 Thread Gollu Appalanaidu
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

[PATCH 0/3] adding ctrl list (cns 0x13) support and random fixes

2021-05-17 Thread Gollu Appalanaidu
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 for nsid

[PATCH 3/3] hw/nvme/ctrl: documentation fix

2021-05-17 Thread Gollu Appalanaidu
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 813a72c655..a3df26

[PATCH] hw/nvme/ctrl: fix functions style

2021-05-21 Thread Gollu Appalanaidu
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

[PATCH 1/2] hw/nvme: add support for boot partiotions

2021-05-24 Thread Gollu Appalanaidu
, as 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

[PATCH 0/2] add boot partitions support and read test case

2021-05-24 Thread Gollu Appalanaidu
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

[PATCH 2/2] tests/qtest/nvme-test: add boot partition read test

2021-05-24 Thread Gollu Appalanaidu
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

Re: [PATCH] hw/nvme/ctrl: fix functions style

2021-05-24 Thread Gollu Appalanaidu
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

[PATCH v2 0/2] add boot partitions support and read test case

2021-06-01 Thread Gollu Appalanaidu
-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

[PATCH v2 2/2] tests/qtest/nvme-test: add boot partition read test

2021-06-01 Thread Gollu Appalanaidu
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

[PATCH v2 1/2] hw/nvme: fix endianess conversion and add controller list

2021-06-01 Thread Gollu Appalanaidu
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

[PATCH v2 1/2] hw/nvme: add support for boot partiotions

2021-06-01 Thread Gollu Appalanaidu
, as 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

[PATCH v2 2/2] hw/nvme: documentation fix

2021-06-01 Thread Gollu Appalanaidu
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 813a72c655..a3df26

[PATCH] hw/block/nvme: fix csi field for cns 0x00 and 0x11

2021-04-26 Thread Gollu Appalanaidu
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/nvme

Re: [PATCH] hw/block/nvme: fix csi field for cns 0x00 and 0x11

2021-04-27 Thread Gollu Appalanaidu
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 Appalanaidu

[PATCH v2] hw/nvme/ctrl: fix csi field for cns 0x00 and 0x11

2021-04-27 Thread Gollu Appalanaidu
-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 deletions(-) diff --git

Re: [PATCH for-6.0 2/7] hw/block/nvme: fix missing string representation for ns attachment

2021-03-29 Thread Gollu Appalanaidu
t;; default:return "NVME_ADM_CMD_UNKNOWN"; } -- Reviewed-by: Gollu Appalanaidu 2.31.0

Re: [PATCH for-6.0 1/7] hw/block/nvme: fix pi constraint check

2021-03-29 Thread Gollu Appalanaidu
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

Re: [PATCH for-6.0 1/7] hw/block/nvme: fix pi constraint check

2021-03-30 Thread 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

Re: [PATCH for-6.0 6/7] hw/block/nvme: update dmsrl limit on namespace detachment

2021-03-30 Thread Gollu Appalanaidu
, NvmeRequest *req) } nvme_ns_detach(ctrl, ns); + +__nvme_update_dmrsl(ctrl); } /* -- 2.31.0 Reviwed-by: Gollu Appalanaidu

Re: [PATCH for-6.0 5/7] hw/block/nvme: fix warning about legacy namespace configuration

2021-03-30 Thread Gollu Appalanaidu
**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

Re: [PATCH v2 2/2] hw/block/nvme: fix ref counting in nvme_format_ns

2021-03-29 Thread Gollu Appalanaidu
(*count)--; +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

Re: [PATCH v2 1/2] hw/block/nvme: fix resource leak in nvme_dif_rw

2021-03-29 Thread Gollu Appalanaidu
nvme-dif.c @@ -432,7 +432,7 @@ uint16_t nvme_dif_rw(NvmeCtrl *n, NvmeRequest *req) status = nvme_map_dptr(n, >sg, mapped_len, >cmd); if (status) { -return status; +goto err; Looks good to me. } ctx->data.bounce = g_malloc(len); -- Reviewed-by: Gollu Appalanaidu 2.31.0

[PATCH v2] hw/block/nvme: add device self test command support

2021-03-31 Thread Gollu Appalanaidu
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

[PATCH v3] hw/block/nvme: add device self test command support

2021-03-31 Thread Gollu Appalanaidu
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

[PATCH] hw/block/nvme: add device self test command support

2021-03-31 Thread Gollu Appalanaidu
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

Re: [PATCH for-6.0 7/7] hw/block/nvme: fix handling of private namespaces

2021-04-05 Thread Gollu Appalanaidu
ze(PCIDevice *pci_dev, Error **errp) ns = >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

Re: [PATCH for-6.0 0/7] hw/block/nvme: misc fixes

2021-04-05 Thread Gollu Appalanaidu
deletions(-) -- Reviewed-by: Gollu Appalanaidu 2.31.0

[PATCH 1/2] hw/block/nvme: align with existing style

2021-03-17 Thread Gollu Appalanaidu
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

[PATCH 2/2] hw/block/nvme: align reserved fields declarations

2021-03-17 Thread Gollu Appalanaidu
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

[PATCH] hw/block/nvme: slba equal to nsze is out of bounds if nlb is 1-based

2021-04-09 Thread Gollu Appalanaidu
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

Re: [PATCH 1/2] hw/block/nvme: store aiocb in compare

2021-04-09 Thread Gollu Appalanaidu
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

Re: [PATCH 2/2] hw/block/nvme: drain namespaces on sq deletion

2021-04-09 Thread Gollu Appalanaidu
"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 deletions(-) di

[PATCH v2] hw/block/nvme: align with existing style

2021-04-15 Thread Gollu Appalanaidu
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

Re: [PATCH v2] hw/block/nvme: align with existing style

2021-04-15 Thread Gollu Appalanaidu
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

Re: [PATCH v3] hw/block/nvme: add device self test command support

2021-04-12 Thread Gollu Appalanaidu
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

[PATCH] hw/block/nvme: fix io-command set profile feature

2021-04-19 Thread Gollu Appalanaidu
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

Re: [PATCH 2/2] hw/block/nvme: fix lbaf formats initialization

2021-04-16 Thread Gollu Appalanaidu
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

[PATCH v2] hw/block/nvme: fix lbaf formats initialization

2021-04-16 Thread Gollu Appalanaidu
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

[PATCH] hw/block/nvme: function formatting fix

2021-04-20 Thread Gollu Appalanaidu
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

Re: [PATCH v3] hw/block/nvme: fix lbaf formats initialization

2021-04-21 Thread Gollu Appalanaidu
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

[PATCH v3] hw/block/nvme: fix lbaf formats initialization

2021-04-16 Thread Gollu Appalanaidu
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

[PATCH 2/2] hw/block/nvme: fix lbaf formats initialization

2021-04-16 Thread Gollu Appalanaidu
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

[PATCH 1/2] hw/block/nvme: consider metadata read aio return value in compare

2021-04-16 Thread Gollu Appalanaidu
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

[PATCH v3] hw/block/nvme: align with existing style

2021-04-15 Thread 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

[PATCH] hw/block/nvme: remove redundant invalid_lba_range trace

2021-04-14 Thread Gollu Appalanaidu
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

[PATCH 3/3] hw/block/nvme: add id ns metadata cap (mc) enum

2021-04-21 Thread Gollu Appalanaidu
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

[PATCH 1/3] hw/block/nvme: fix lbaf formats initialization

2021-04-21 Thread Gollu Appalanaidu
read-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

[PATCH 2/3] hw/block/nvme: add id ns flbas enum

2021-04-21 Thread Gollu Appalanaidu
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

[PATCH 0/3] hw/block/nvme: fixes lbaf formats initialization and adds idns enums

2021-04-21 Thread Gollu Appalanaidu
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

Re: [PATCH] hw/nvme: fix mmio read

2021-07-13 Thread 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

Re: [PATCH v3 1/5] hw/nvme: split pmrmsc register into upper and lower

2021-07-14 Thread 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

Re: [PATCH v3 5/5] tests/qtest/nvme-test: add mmio read test

2021-07-14 Thread Gollu Appalanaidu
odes(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

Re: [PATCH v3 2/5] hw/nvme: use symbolic names for registers

2021-07-14 Thread Gollu Appalanaidu
return; -case 0xe18: /* PMRMSCU */ +case NVME_REG_PMRMSCU: if (!NVME_CAP_PMRS(n->bar.cap)) { return; } @@ -5974,7 +5974,7 @@ static uint64_t nvme_mmio_read(void *opaque, hwaddr addr, unsigned size) * from PMRSTS should ensure prior writes * made