diff mbox series

[v2,2/4] tools/testing/cxl: Fix command effects for inject/clear poison

Message ID 20230602-vv-fw_update-v2-2-e9e5cd5adb44@intel.com
State Superseded
Headers show
Series cxl: Add a firmware update mechanism and cxl_test emulation | expand

Commit Message

Verma, Vishal L June 5, 2023, 8:20 p.m. UTC
The CXL spec (3.0, section 8.2.9.8.4) Lists Inject Poison and Clear
Poison as having the effects of "Immediate Data Change". Fix this in the
mock driver so that the command effect log is populated correctly.

Fixes: 371c16101ee8 ("tools/testing/cxl: Mock the Inject Poison mailbox command")
Cc: Alison Schofield <alison.schofield@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 tools/testing/cxl/test/mem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alison Schofield June 7, 2023, 7:18 p.m. UTC | #1
On Mon, Jun 05, 2023 at 02:20:23PM -0600, Vishal Verma wrote:
> The CXL spec (3.0, section 8.2.9.8.4) Lists Inject Poison and Clear
> Poison as having the effects of "Immediate Data Change". Fix this in the
> mock driver so that the command effect log is populated correctly.
> 
> Fixes: 371c16101ee8 ("tools/testing/cxl: Mock the Inject Poison mailbox command")
> Cc: Alison Schofield <alison.schofield@intel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>

Hi Vishal,
I took a look at this, wondering if we should promote it as a 6.4 fix.
I came up with a no. It has no user impact of inject/clear usage in the
mock driver environment.

Thanks for fixing!
Reviewed-by: Alison Schofield <alison.schofield@intel.com>


> ---
>  tools/testing/cxl/test/mem.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
> index 34b48027b3de..403cd3608772 100644
> --- a/tools/testing/cxl/test/mem.c
> +++ b/tools/testing/cxl/test/mem.c
> @@ -52,11 +52,11 @@ static struct cxl_cel_entry mock_cel[] = {
>  	},
>  	{
>  		.opcode = cpu_to_le16(CXL_MBOX_OP_INJECT_POISON),
> -		.effect = cpu_to_le16(0),
> +		.effect = cpu_to_le16(EFFECT(2)),
>  	},
>  	{
>  		.opcode = cpu_to_le16(CXL_MBOX_OP_CLEAR_POISON),
> -		.effect = cpu_to_le16(0),
> +		.effect = cpu_to_le16(EFFECT(2)),
>  	},
>  };
>  
> 
> -- 
> 2.40.1
>
Jonathan Cameron June 8, 2023, 11:01 a.m. UTC | #2
On Wed, 7 Jun 2023 12:18:55 -0700
Alison Schofield <alison.schofield@intel.com> wrote:

> On Mon, Jun 05, 2023 at 02:20:23PM -0600, Vishal Verma wrote:
> > The CXL spec (3.0, section 8.2.9.8.4) Lists Inject Poison and Clear
> > Poison as having the effects of "Immediate Data Change". Fix this in the
> > mock driver so that the command effect log is populated correctly.
> > 
> > Fixes: 371c16101ee8 ("tools/testing/cxl: Mock the Inject Poison mailbox command")
> > Cc: Alison Schofield <alison.schofield@intel.com>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>  
> 
> Hi Vishal,
> I took a look at this, wondering if we should promote it as a 6.4 fix.
> I came up with a no. It has no user impact of inject/clear usage in the
> mock driver environment.
> 
> Thanks for fixing!
> Reviewed-by: Alison Schofield <alison.schofield@intel.com>
> 
Agreed on patch and Alison's comment

FWIW

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> 
> > ---
> >  tools/testing/cxl/test/mem.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
> > index 34b48027b3de..403cd3608772 100644
> > --- a/tools/testing/cxl/test/mem.c
> > +++ b/tools/testing/cxl/test/mem.c
> > @@ -52,11 +52,11 @@ static struct cxl_cel_entry mock_cel[] = {
> >  	},
> >  	{
> >  		.opcode = cpu_to_le16(CXL_MBOX_OP_INJECT_POISON),
> > -		.effect = cpu_to_le16(0),
> > +		.effect = cpu_to_le16(EFFECT(2)),
> >  	},
> >  	{
> >  		.opcode = cpu_to_le16(CXL_MBOX_OP_CLEAR_POISON),
> > -		.effect = cpu_to_le16(0),
> > +		.effect = cpu_to_le16(EFFECT(2)),
> >  	},
> >  };
> >  
> > 
> > -- 
> > 2.40.1
> >   
>
diff mbox series

Patch

diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
index 34b48027b3de..403cd3608772 100644
--- a/tools/testing/cxl/test/mem.c
+++ b/tools/testing/cxl/test/mem.c
@@ -52,11 +52,11 @@  static struct cxl_cel_entry mock_cel[] = {
 	},
 	{
 		.opcode = cpu_to_le16(CXL_MBOX_OP_INJECT_POISON),
-		.effect = cpu_to_le16(0),
+		.effect = cpu_to_le16(EFFECT(2)),
 	},
 	{
 		.opcode = cpu_to_le16(CXL_MBOX_OP_CLEAR_POISON),
-		.effect = cpu_to_le16(0),
+		.effect = cpu_to_le16(EFFECT(2)),
 	},
 };