QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] hw/block/nvme: fix io-command set profile feature
       [not found] <CGME20210419105126epcas5p4b8c4ed2a308b2cee570570485b7b5c89@epcas5p4.samsung.com>
@ 2021-04-19 10:48 ` Gollu Appalanaidu
  2021-04-19 11:12   ` Klaus Jensen
  2021-04-20 20:02   ` Klaus Jensen
  0 siblings, 2 replies; 3+ messages in thread
From: Gollu Appalanaidu @ 2021-04-19 10:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, kwolf, qemu-block, Gollu Appalanaidu, mreitz, its, stefanha, kbusch

Currently IO Command Set Profile feaure is supported, but
feature support flag not set and this feature is changable
add support for that.

Remove filling default value of feature in CQE CDW0 with zero,
since it fallbacks to default case and it is zero initialized,
if feature default value not set explicitly.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
---
 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 nvme_feature_support[NVME_FID_MAX] = {
     [NVME_WRITE_ATOMICITY]          = true,
     [NVME_ASYNCHRONOUS_EVENT_CONF]  = true,
     [NVME_TIMESTAMP]                = true,
+    [NVME_COMMAND_SET_PROFILE]      = true,
 };
 
 static const uint32_t nvme_feature_cap[NVME_FID_MAX] = {
@@ -194,6 +195,7 @@ static const uint32_t nvme_feature_cap[NVME_FID_MAX] = {
     [NVME_NUMBER_OF_QUEUES]         = NVME_FEAT_CAP_CHANGE,
     [NVME_ASYNCHRONOUS_EVENT_CONF]  = NVME_FEAT_CAP_CHANGE,
     [NVME_TIMESTAMP]                = NVME_FEAT_CAP_CHANGE,
+    [NVME_COMMAND_SET_PROFILE]      = NVME_FEAT_CAP_CHANGE,
 };
 
 static const uint32_t nvme_cse_acs[256] = {
@@ -4707,9 +4709,6 @@ defaults:
             result |= NVME_INTVC_NOCOALESCING;
         }
         break;
-    case NVME_COMMAND_SET_PROFILE:
-        result = 0;
-        break;
     default:
         result = nvme_feature_default[fid];
         break;
-- 
2.17.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hw/block/nvme: fix io-command set profile feature
  2021-04-19 10:48 ` [PATCH] hw/block/nvme: fix io-command set profile feature Gollu Appalanaidu
@ 2021-04-19 11:12   ` Klaus Jensen
  2021-04-20 20:02   ` Klaus Jensen
  1 sibling, 0 replies; 3+ messages in thread
From: Klaus Jensen @ 2021-04-19 11:12 UTC (permalink / raw)
  To: Gollu Appalanaidu
  Cc: fam, kwolf, qemu-block, qemu-devel, mreitz, stefanha, kbusch


[-- Attachment #1: Type: text/plain, Size: 1737 bytes --]

On Apr 19 16:18, Gollu Appalanaidu wrote:
>Currently IO Command Set Profile feaure is supported, but
>feature support flag not set and this feature is changable
>add support for that.
>
>Remove filling default value of feature in CQE CDW0 with zero,
>since it fallbacks to default case and it is zero initialized,
>if feature default value not set explicitly.
>
>Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
>---
> 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 nvme_feature_support[NVME_FID_MAX] = {
>     [NVME_WRITE_ATOMICITY]          = true,
>     [NVME_ASYNCHRONOUS_EVENT_CONF]  = true,
>     [NVME_TIMESTAMP]                = true,
>+    [NVME_COMMAND_SET_PROFILE]      = true,
> };
>
> static const uint32_t nvme_feature_cap[NVME_FID_MAX] = {
>@@ -194,6 +195,7 @@ static const uint32_t nvme_feature_cap[NVME_FID_MAX] = {
>     [NVME_NUMBER_OF_QUEUES]         = NVME_FEAT_CAP_CHANGE,
>     [NVME_ASYNCHRONOUS_EVENT_CONF]  = NVME_FEAT_CAP_CHANGE,
>     [NVME_TIMESTAMP]                = NVME_FEAT_CAP_CHANGE,
>+    [NVME_COMMAND_SET_PROFILE]      = NVME_FEAT_CAP_CHANGE,
> };
>
> static const uint32_t nvme_cse_acs[256] = {
>@@ -4707,9 +4709,6 @@ defaults:
>             result |= NVME_INTVC_NOCOALESCING;
>         }
>         break;
>-    case NVME_COMMAND_SET_PROFILE:
>-        result = 0;
>-        break;
>     default:
>         result = nvme_feature_default[fid];
>         break;
>-- 
>2.17.1
>
>

LGTM.

Reviewed-by: Klaus Jensen <k.jensen@samsung.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hw/block/nvme: fix io-command set profile feature
  2021-04-19 10:48 ` [PATCH] hw/block/nvme: fix io-command set profile feature Gollu Appalanaidu
  2021-04-19 11:12   ` Klaus Jensen
@ 2021-04-20 20:02   ` Klaus Jensen
  1 sibling, 0 replies; 3+ messages in thread
From: Klaus Jensen @ 2021-04-20 20:02 UTC (permalink / raw)
  To: Gollu Appalanaidu
  Cc: fam, kwolf, qemu-block, qemu-devel, mreitz, stefanha, kbusch


[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]

On Apr 19 16:18, Gollu Appalanaidu wrote:
>Currently IO Command Set Profile feaure is supported, but
>feature support flag not set and this feature is changable
>add support for that.
>
>Remove filling default value of feature in CQE CDW0 with zero,
>since it fallbacks to default case and it is zero initialized,
>if feature default value not set explicitly.
>
>Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
>---
> 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 nvme_feature_support[NVME_FID_MAX] = {
>     [NVME_WRITE_ATOMICITY]          = true,
>     [NVME_ASYNCHRONOUS_EVENT_CONF]  = true,
>     [NVME_TIMESTAMP]                = true,
>+    [NVME_COMMAND_SET_PROFILE]      = true,
> };
>
> static const uint32_t nvme_feature_cap[NVME_FID_MAX] = {
>@@ -194,6 +195,7 @@ static const uint32_t nvme_feature_cap[NVME_FID_MAX] = {
>     [NVME_NUMBER_OF_QUEUES]         = NVME_FEAT_CAP_CHANGE,
>     [NVME_ASYNCHRONOUS_EVENT_CONF]  = NVME_FEAT_CAP_CHANGE,
>     [NVME_TIMESTAMP]                = NVME_FEAT_CAP_CHANGE,
>+    [NVME_COMMAND_SET_PROFILE]      = NVME_FEAT_CAP_CHANGE,
> };
>
> static const uint32_t nvme_cse_acs[256] = {
>@@ -4707,9 +4709,6 @@ defaults:
>             result |= NVME_INTVC_NOCOALESCING;
>         }
>         break;
>-    case NVME_COMMAND_SET_PROFILE:
>-        result = 0;
>-        break;
>     default:
>         result = nvme_feature_default[fid];
>         break;
>-- 
>2.17.1
>

Applied to nvme-next. Thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20210419105126epcas5p4b8c4ed2a308b2cee570570485b7b5c89@epcas5p4.samsung.com>
2021-04-19 10:48 ` [PATCH] hw/block/nvme: fix io-command set profile feature Gollu Appalanaidu
2021-04-19 11:12   ` Klaus Jensen
2021-04-20 20:02   ` Klaus Jensen

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git
	git clone --mirror https://lore.kernel.org/qemu-devel/2 qemu-devel/git/2.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git