CXL_MEM_QUERY_COMMANDS returning commands not supported by the hardware.
PATCH RESEND 1/1 CXL_MEM_QUERY_COMMANDS returning commands not supported by the hardware.
Resent because I can't type email addresses so this didn't got to the list..
Hi All,
Noticed, whilst implementing a switch CCI mailbox version of the same...
UAPI documentation include/uapi/linux/cxl_mem.h says:
struct cxl_mem_query_commands...
Allow userspace to query the available commands supported by both the driver, and the hardware.
Currently it seem to report all commands without checking they are in the CEL.
Easy to tell given I just added a bunch of switch commands which are apparently supported by the type 3 devices (which would be novel).
How to fix? Make the code do what the docs suggest, or change the docs?
Or am I missing something?
Thanks,
Jonathan
Quoted 16 lines · Jonathan Cameron
Resent because I can't type email addresses so this didn't got to the list..
Hi All,
Noticed, whilst implementing a switch CCI mailbox version of the same...
UAPI documentation
include/uapi/linux/cxl_mem.hsays:struct
cxl_mem_query_commands...Allow userspace to query the available commands supported by both the driver, and the hardware.
Currently it seem to report all commands without checking they are in the CEL.
Quoted 7 lines
Easy to tell given I just added a bunch of switch commands which are apparently supported by the type 3 devices (which would be novel).
How to fix? Make the code do what the docs suggest, or change the docs?
Or am I missing something?
No, you are not missing anything. This topic has come up before. Why have a query if it does not reflect the state of the CEL. I would be in favor of the enabled state in the CEL being communicated in the CXL_MEM_QUERY_COMMANDS output payload.