* [PATCH] cxl core:wrong value of macro definition
@ 2024-07-08 15:29 peng guo
2024-07-08 16:31 ` Dave Jiang
2024-07-08 18:46 ` [PATCH] cxl core:wrong value of macro definition Alison Schofield
0 siblings, 2 replies; 8+ messages in thread
From: peng guo @ 2024-07-08 15:29 UTC (permalink / raw)
To: dave, jonathan.cameron, dave.jiang, alison.schofield,
vishal.l.verma, ira.weiny, dan.j.williams
Cc: linux-cxl, linux-kernel, wyguopeng, peng guo
The first value of the macro definition DEFINE_CXL_VENDOR_DEBUG_UUID
does not match the definition in the CXL 2.0 specification table 170.
Signed-off-by: peng guo <engguopeng@buaa.edu.cn>
---
drivers/cxl/cxlmem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index af8169ccdbc0..feb1106559d2 100644
--- a/drivers/cxl/cxlmem.h
+++ b/drivers/cxl/cxlmem.h
@@ -563,7 +563,7 @@ enum cxl_opcode {
0x3b, 0x3f, 0x17)
#define DEFINE_CXL_VENDOR_DEBUG_UUID \
- UUID_INIT(0xe1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
+ UUID_INIT(0x5e1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
0x40, 0x3d, 0x86)
struct cxl_mbox_get_supported_logs {
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] cxl core:wrong value of macro definition
2024-07-08 15:29 [PATCH] cxl core:wrong value of macro definition peng guo
@ 2024-07-08 16:31 ` Dave Jiang
2024-07-09 14:12 ` [PATCH v2] cxl/core: Fix the UUID of CXL vendor debug Log identifier peng guo
2024-07-08 18:46 ` [PATCH] cxl core:wrong value of macro definition Alison Schofield
1 sibling, 1 reply; 8+ messages in thread
From: Dave Jiang @ 2024-07-08 16:31 UTC (permalink / raw)
To: peng guo, dave, jonathan.cameron, alison.schofield,
vishal.l.verma, ira.weiny, dan.j.williams
Cc: linux-cxl, linux-kernel, wyguopeng
On 7/8/24 8:29 AM, peng guo wrote:
> The first value of the macro definition DEFINE_CXL_VENDOR_DEBUG_UUID
> does not match the definition in the CXL 2.0 specification table 170.
Thank you for the fix. Please use latest spec to identify. CXL spec r3.1 Table 8-71 I think?
Also, can you please provide a Fixes tag for this issue? Thanks!
>
> Signed-off-by: peng guo <engguopeng@buaa.edu.cn>
> ---
> drivers/cxl/cxlmem.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
> index af8169ccdbc0..feb1106559d2 100644
> --- a/drivers/cxl/cxlmem.h
> +++ b/drivers/cxl/cxlmem.h
> @@ -563,7 +563,7 @@ enum cxl_opcode {
> 0x3b, 0x3f, 0x17)
>
> #define DEFINE_CXL_VENDOR_DEBUG_UUID \
> - UUID_INIT(0xe1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
> + UUID_INIT(0x5e1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
> 0x40, 0x3d, 0x86)
>
> struct cxl_mbox_get_supported_logs {
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v2] cxl/core: Fix the UUID of CXL vendor debug Log identifier
2024-07-08 16:31 ` Dave Jiang
@ 2024-07-09 14:12 ` peng guo
2024-07-09 15:48 ` Dave Jiang
2024-07-09 18:33 ` Alison Schofield
0 siblings, 2 replies; 8+ messages in thread
From: peng guo @ 2024-07-09 14:12 UTC (permalink / raw)
To: dave, jonathan.cameron, dave.jiang, alison.schofield,
vishal.l.verma, ira.weiny, dan.j.williams
Cc: linux-cxl, linux-kernel, wyguopeng, peng guo
Fix the definition value of DEFINE_CXL_VENDOR_DEBUG_UUID to match the
CXL r3.1 specification, although this value is not currently used.
All CXL devices that support a debug log shall support the Vendor Debug
Log to allow the log to be accessed through a common host driver, for any
device, all versions of the CXL specification define the same value with
Log Identifier of: 5e1819d9-11a9-400c-811f-d60719403d86
refer to:
CXL spec r2.0 Table 169
CXL spec r3.0 Table 8-62
CXL spec r3.1 Table 8-71
Fixes: 49be6dd80751 ("cxl/mbox: Move command definitions to common location")
Signed-off-by: peng guo <engguopeng@buaa.edu.cn>
---
v1 -> v2: update commit message and addressed review comments
drivers/cxl/cxlmem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index af8169ccdbc0..feb1106559d2 100644
--- a/drivers/cxl/cxlmem.h
+++ b/drivers/cxl/cxlmem.h
@@ -563,7 +563,7 @@ enum cxl_opcode {
0x3b, 0x3f, 0x17)
#define DEFINE_CXL_VENDOR_DEBUG_UUID \
- UUID_INIT(0xe1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
+ UUID_INIT(0x5e1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
0x40, 0x3d, 0x86)
struct cxl_mbox_get_supported_logs {
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v2] cxl/core: Fix the UUID of CXL vendor debug Log identifier
2024-07-09 14:12 ` [PATCH v2] cxl/core: Fix the UUID of CXL vendor debug Log identifier peng guo
@ 2024-07-09 15:48 ` Dave Jiang
2024-07-09 18:33 ` Alison Schofield
1 sibling, 0 replies; 8+ messages in thread
From: Dave Jiang @ 2024-07-09 15:48 UTC (permalink / raw)
To: peng guo, dave, jonathan.cameron, alison.schofield,
vishal.l.verma, ira.weiny, dan.j.williams
Cc: linux-cxl, linux-kernel, wyguopeng
On 7/9/24 7:12 AM, peng guo wrote:
> Fix the definition value of DEFINE_CXL_VENDOR_DEBUG_UUID to match the
> CXL r3.1 specification, although this value is not currently used.
>
> All CXL devices that support a debug log shall support the Vendor Debug
> Log to allow the log to be accessed through a common host driver, for any
> device, all versions of the CXL specification define the same value with
> Log Identifier of: 5e1819d9-11a9-400c-811f-d60719403d86
>
> refer to:
> CXL spec r2.0 Table 169
> CXL spec r3.0 Table 8-62
> CXL spec r3.1 Table 8-71
>
> Fixes: 49be6dd80751 ("cxl/mbox: Move command definitions to common location")
Thanks for the update Peng.
This one is tricky as the definition has been moved twice, but the original commit that introduced the error was here:
472b1ce6e9d6 ("cxl/mem: Enable commands via CEL")
I will update that when I apply the patch.
Next time for follow on patch revisions, please post as independent email rather than threaded behind the previous submission. Thanks!
> Signed-off-by: peng guo <engguopeng@buaa.edu.cn>
> ---
> v1 -> v2: update commit message and addressed review comments
>
> drivers/cxl/cxlmem.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
> index af8169ccdbc0..feb1106559d2 100644
> --- a/drivers/cxl/cxlmem.h
> +++ b/drivers/cxl/cxlmem.h
> @@ -563,7 +563,7 @@ enum cxl_opcode {
> 0x3b, 0x3f, 0x17)
>
> #define DEFINE_CXL_VENDOR_DEBUG_UUID \
> - UUID_INIT(0xe1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
> + UUID_INIT(0x5e1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
> 0x40, 0x3d, 0x86)
>
> struct cxl_mbox_get_supported_logs {
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2] cxl/core: Fix the UUID of CXL vendor debug Log identifier
2024-07-09 14:12 ` [PATCH v2] cxl/core: Fix the UUID of CXL vendor debug Log identifier peng guo
2024-07-09 15:48 ` Dave Jiang
@ 2024-07-09 18:33 ` Alison Schofield
2024-07-09 19:19 ` Dan Williams
1 sibling, 1 reply; 8+ messages in thread
From: Alison Schofield @ 2024-07-09 18:33 UTC (permalink / raw)
To: peng guo
Cc: dave, jonathan.cameron, dave.jiang, vishal.l.verma, ira.weiny,
dan.j.williams, linux-cxl, linux-kernel, wyguopeng
On Tue, Jul 09, 2024 at 10:12:39PM +0800, peng guo wrote:
> Fix the definition value of DEFINE_CXL_VENDOR_DEBUG_UUID to match the
> CXL r3.1 specification, although this value is not currently used.
I thought the value was actually used.
Please help me understand by responding to v1 review:
https://lore.kernel.org/Zow0Aw+vrXShXv+n@aschofie-mobl2/
--Alison
>
> All CXL devices that support a debug log shall support the Vendor Debug
> Log to allow the log to be accessed through a common host driver, for any
> device, all versions of the CXL specification define the same value with
> Log Identifier of: 5e1819d9-11a9-400c-811f-d60719403d86
>
> refer to:
> CXL spec r2.0 Table 169
> CXL spec r3.0 Table 8-62
> CXL spec r3.1 Table 8-71
>
> Fixes: 49be6dd80751 ("cxl/mbox: Move command definitions to common location")
> Signed-off-by: peng guo <engguopeng@buaa.edu.cn>
> ---
> v1 -> v2: update commit message and addressed review comments
>
> drivers/cxl/cxlmem.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
> index af8169ccdbc0..feb1106559d2 100644
> --- a/drivers/cxl/cxlmem.h
> +++ b/drivers/cxl/cxlmem.h
> @@ -563,7 +563,7 @@ enum cxl_opcode {
> 0x3b, 0x3f, 0x17)
>
> #define DEFINE_CXL_VENDOR_DEBUG_UUID \
> - UUID_INIT(0xe1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
> + UUID_INIT(0x5e1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
> 0x40, 0x3d, 0x86)
>
> struct cxl_mbox_get_supported_logs {
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2] cxl/core: Fix the UUID of CXL vendor debug Log identifier
2024-07-09 18:33 ` Alison Schofield
@ 2024-07-09 19:19 ` Dan Williams
0 siblings, 0 replies; 8+ messages in thread
From: Dan Williams @ 2024-07-09 19:19 UTC (permalink / raw)
To: Alison Schofield, peng guo
Cc: dave, jonathan.cameron, dave.jiang, vishal.l.verma, ira.weiny,
dan.j.williams, linux-cxl, linux-kernel, wyguopeng
Alison Schofield wrote:
> On Tue, Jul 09, 2024 at 10:12:39PM +0800, peng guo wrote:
> > Fix the definition value of DEFINE_CXL_VENDOR_DEBUG_UUID to match the
> > CXL r3.1 specification, although this value is not currently used.
>
> I thought the value was actually used.
> Please help me understand by responding to v1 review:
> https://lore.kernel.org/Zow0Aw+vrXShXv+n@aschofie-mobl2/
I assume that this was some "by inspection" reason for the "how found".
This effectively proves that no one has ever tried to use
CXL_MEM_COMMAND_ID_CLEAR_LOG with the vendor debug log. It could be the
case that everyone to date that ever had that need is just using RAW
commands to do it.
To me this is another example of Linux command wrapping CXL command
failure.
To your point though, it would be good to get that user visible effect
into the changelog so that distros can decide about the impact of
backporting this fix.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cxl core:wrong value of macro definition
2024-07-08 15:29 [PATCH] cxl core:wrong value of macro definition peng guo
2024-07-08 16:31 ` Dave Jiang
@ 2024-07-08 18:46 ` Alison Schofield
2024-07-10 0:07 ` peng guo
1 sibling, 1 reply; 8+ messages in thread
From: Alison Schofield @ 2024-07-08 18:46 UTC (permalink / raw)
To: peng guo
Cc: dave, jonathan.cameron, dave.jiang, vishal.l.verma, ira.weiny,
dan.j.williams, linux-cxl, linux-kernel, wyguopeng
On Mon, Jul 08, 2024 at 11:29:02PM +0800, peng guo wrote:
> The first value of the macro definition DEFINE_CXL_VENDOR_DEBUG_UUID
> does not match the definition in the CXL 2.0 specification table 170.
Please update commit message format and make it specific, like:
cxl/core: Support mbox op clear log of vendor debug logs
Isn't that what this is actually doing? It's correcting a typo to enable
the clearing of those logs. If that's true, let's not bury the impact
in a typo headline.
See cxl_payload_from_user_allowed(). I'm guessing that's how you
found this.
--Alison
>
> Signed-off-by: peng guo <engguopeng@buaa.edu.cn>
> ---
> drivers/cxl/cxlmem.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
> index af8169ccdbc0..feb1106559d2 100644
> --- a/drivers/cxl/cxlmem.h
> +++ b/drivers/cxl/cxlmem.h
> @@ -563,7 +563,7 @@ enum cxl_opcode {
> 0x3b, 0x3f, 0x17)
>
> #define DEFINE_CXL_VENDOR_DEBUG_UUID \
> - UUID_INIT(0xe1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
> + UUID_INIT(0x5e1819d9, 0x11a9, 0x400c, 0x81, 0x1f, 0xd6, 0x07, 0x19, \
> 0x40, 0x3d, 0x86)
>
> struct cxl_mbox_get_supported_logs {
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] cxl core:wrong value of macro definition
2024-07-08 18:46 ` [PATCH] cxl core:wrong value of macro definition Alison Schofield
@ 2024-07-10 0:07 ` peng guo
0 siblings, 0 replies; 8+ messages in thread
From: peng guo @ 2024-07-10 0:07 UTC (permalink / raw)
To: alison.schofield
Cc: dan.j.williams, dave.jiang, dave, engguopeng, ira.weiny,
jonathan.cameron, linux-cxl, linux-kernel, vishal.l.verma,
wyguopeng
Sorry, I didn't use the latest code when I checked your reply, so that I didn't see this definition in use.
I just started browsing the CXL related code, and just happened to find this error point when checking the specification.
It will fail when the user uses CXL_MBOX_OP_CLEAR_LOG. So, do I need to continue to update message and make it specific.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-07-10 0:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-08 15:29 [PATCH] cxl core:wrong value of macro definition peng guo
2024-07-08 16:31 ` Dave Jiang
2024-07-09 14:12 ` [PATCH v2] cxl/core: Fix the UUID of CXL vendor debug Log identifier peng guo
2024-07-09 15:48 ` Dave Jiang
2024-07-09 18:33 ` Alison Schofield
2024-07-09 19:19 ` Dan Williams
2024-07-08 18:46 ` [PATCH] cxl core:wrong value of macro definition Alison Schofield
2024-07-10 0:07 ` peng guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox