Skip to contentSkip to conversation

cxl/test: Define a CFMWS capable of a 3 way HB interleave

PATCH Superseded [email protected] 4 participants 5 messages Feb 24, 2025 – Feb 26, 2025 CXL

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 cxl/test: Define a CFMWS capable of a 3 way HB interleave

From: Alison Schofield <[email protected]>

The CXL unit test cxl-xor-region.sh is skipping a 1+1+1 region interleave test case because the window is not defined.

Additionally, upcoming expansion of 3 way HB interleave test cases (like 2+2+2) require the same window.

Replace an unused CFMWS with a 3-way capable CFMWS in the set of CFMWS's loaded when interleave_arithmetic=1.

---
 tools/testing/cxl/test/cxl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/cxl/test/cxl.c +4 -4
index 083a66a52731..e5cd874614d2 100644
@@ -331,14 +331,14 @@ static struct {
 				.length = sizeof(mock_cedt.cfmws8),
 			},
 			.interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
-			.interleave_ways = 2,
-			.granularity = 0,
+			.interleave_ways = 8,
+			.granularity = 1,
 			.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
 					ACPI_CEDT_CFMWS_RESTRICT_PMEM,
 			.qtg_id = FAKE_QTG_ID,
-			.window_size = SZ_256M * 16UL,
+			.window_size = SZ_512M * 6UL,
 		},
-		.target = { 0, 1, 0, 1, },
+		.target = { 0, 1, 2, },
 	},
 	.cxims0 = {
 		.cxims = {

base-commit: 2bb67004903cfd35710750654669a77e7223fcd1

Signature · 1 line
2.37.3
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · On 2/24/25 4:50 PM, [email protected] wrote:

From: Alison Schofield <[email protected]>

The CXL unit test cxl-xor-region.sh is skipping a 1+1+1 region interleave test case because the window is not defined.

Quoted 7 lines

Additionally, upcoming expansion of 3 way HB interleave test cases (like 2+2+2) require the same window.

Replace an unused CFMWS with a 3-way capable CFMWS in the set of CFMWS's loaded when interleave_arithmetic=1.

Quoted 29 lines
---
 tools/testing/cxl/test/cxl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/cxl/test/cxl.c +4 -4
index 083a66a52731..e5cd874614d2 100644
@@ -331,14 +331,14 @@ static struct {
 				.length = sizeof(mock_cedt.cfmws8),
 			},
 			.interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
-			.interleave_ways = 2,
-			.granularity = 0,
+			.interleave_ways = 8,
+			.granularity = 1,
 			.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
 					ACPI_CEDT_CFMWS_RESTRICT_PMEM,
 			.qtg_id = FAKE_QTG_ID,
-			.window_size = SZ_256M * 16UL,
+			.window_size = SZ_512M * 6UL,
 		},
-		.target = { 0, 1, 0, 1, },
+		.target = { 0, 1, 2, },
 	},
 	.cxims0 = {
 		.cxims = {

base-commit: 2bb67004903cfd35710750654669a77e7223fcd1

Tested-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 5 lines · On 25/02/2025 07:50, [email protected] wrote:

From: Alison Schofield <[email protected]>

The CXL unit test cxl-xor-region.sh is skipping a 1+1+1 region interleave test case because the window is not defined.

Quoted 7 lines

Additionally, upcoming expansion of 3 way HB interleave test cases (like 2+2+2) require the same window.

Replace an unused CFMWS with a 3-way capable CFMWS in the set of CFMWS's loaded when interleave_arithmetic=1.

Quoted 29 lines
---
  tools/testing/cxl/test/cxl.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/cxl/test/cxl.c +4 -4
index 083a66a52731..e5cd874614d2 100644
@@ -331,14 +331,14 @@ static struct {
  				.length = sizeof(mock_cedt.cfmws8),
  			},
  			.interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
-			.interleave_ways = 2,
-			.granularity = 0,
+			.interleave_ways = 8,
+			.granularity = 1,
  			.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
  					ACPI_CEDT_CFMWS_RESTRICT_PMEM,
  			.qtg_id = FAKE_QTG_ID,
-			.window_size = SZ_256M * 16UL,
+			.window_size = SZ_512M * 6UL,
  		},
-		.target = { 0, 1, 0, 1, },
+		.target = { 0, 1, 2, },
  	},
  	.cxims0 = {
  		.cxims = {

base-commit: 2bb67004903cfd35710750654669a77e7223fcd1

Reviewed-by on v1 1/1
#3 lore raw
In reply to [email protected]
Quoted 26 lines · alison.schofield@ wrote:

From: Alison Schofield <[email protected]>

The CXL unit test cxl-xor-region.sh is skipping a 1+1+1 region interleave test case because the window is not defined.

Additionally, upcoming expansion of 3 way HB interleave test cases (like 2+2+2) require the same window.

Replace an unused CFMWS with a 3-way capable CFMWS in the set of CFMWS's loaded when interleave_arithmetic=1.

---
 tools/testing/cxl/test/cxl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/cxl/test/cxl.c +0 -2
index 083a66a52731..e5cd874614d2 100644
@@ -331,14 +331,14 @@ static struct {
 				.length = sizeof(mock_cedt.cfmws8),
 			},
 			.interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
-			.interleave_ways = 2,
-			.granularity = 0,

tools/testing/cxl/test/cxl.c static struct { · line 341

Quoted 10 lines
tools/testing/cxl/test/cxl.c +4 -2
+			.interleave_ways = 8,
+			.granularity = 1,
 			.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
 					ACPI_CEDT_CFMWS_RESTRICT_PMEM,
 			.qtg_id = FAKE_QTG_ID,
-			.window_size = SZ_256M * 16UL,
+			.window_size = SZ_512M * 6UL,
 		},
-		.target = { 0, 1, 0, 1, },
+		.target = { 0, 1, 2, },

Minor nit:

Should this also include:

tools/testing/cxl/test/cxl.c +1 -1
index cc8948f49117..f0b5b7b8d1d0 100644
@@ -155,7 +155,7 @@ static struct {
        } cfmws7;
        struct {
                struct acpi_cedt_cfmws cfmws;
-               u32 target[4];
+               u32 target[3];
        } cfmws8;
        struct {
                struct acpi_cedt_cxims cxims;
author maintainer
#4 lore raw
Quoted 31 lines · Ira Weiny
Quoted 30 lines · alison.schofield@ wrote:

From: Alison Schofield <[email protected]>

The CXL unit test cxl-xor-region.sh is skipping a 1+1+1 region interleave test case because the window is not defined.

Additionally, upcoming expansion of 3 way HB interleave test cases (like 2+2+2) require the same window.

Replace an unused CFMWS with a 3-way capable CFMWS in the set of CFMWS's loaded when interleave_arithmetic=1.

---
 tools/testing/cxl/test/cxl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/cxl/test/cxl.c +2 -2
index 083a66a52731..e5cd874614d2 100644
@@ -331,14 +331,14 @@ static struct {
 				.length = sizeof(mock_cedt.cfmws8),
 			},
 			.interleave_arithmetic = ACPI_CEDT_CFMWS_ARITHMETIC_XOR,
-			.interleave_ways = 2,
-			.granularity = 0,
+			.interleave_ways = 8,
+			.granularity = 1,
 			.restrictions = ACPI_CEDT_CFMWS_RESTRICT_TYPE3 |
 					ACPI_CEDT_CFMWS_RESTRICT_PMEM,
Quoted 8 lines

tools/testing/cxl/test/cxl.c static struct { · line 341

Quoted 6 lines
tools/testing/cxl/test/cxl.c +2 -2
 			.qtg_id = FAKE_QTG_ID,
-			.window_size = SZ_256M * 16UL,
+			.window_size = SZ_512M * 6UL,
 		},
-		.target = { 0, 1, 0, 1, },
+		.target = { 0, 1, 2, },

Minor nit:

Not a nit. Thanks, revving!

Quoted 18 lines

Should this also include:

tools/testing/cxl/test/cxl.c +1 -1
index cc8948f49117..f0b5b7b8d1d0 100644
@@ -155,7 +155,7 @@ static struct {
        } cfmws7;
        struct {
                struct acpi_cedt_cfmws cfmws;
-               u32 target[4];
+               u32 target[3];
        } cfmws8;
        struct {
                struct acpi_cedt_cxims cxims;