Home
last modified time | relevance | path

Searched hist:"2 aeaf663b85e436dc6287692b7561ffbf0aa4381" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/cxl/core/
H A Dmbox.cdiff 2aeaf663b85e436dc6287692b7561ffbf0aa4381 Tue Dec 06 05:22:39 CET 2022 Dan Williams <dan.j.williams@intel.com> cxl/mbox: Add variable output size validation for internal commands

cxl_internal_send_cmd() skips output size validation for variable output
commands which is not ideal. Most of the time internal usages want to
fail if the output size does not match what was requested. For other
commands where the caller cannot predict the size there is usually a
a header that conveys how much vaild data is in the payload. For those
cases add @min_out as a parameter to specify what the minimum response
payload needs to be for the caller to parse the rest of the payload.

In this patch only Get Supported Logs has that behavior, but going
forward records retrieval commands like Get Poison List and Get Event
Records can use @min_out to retrieve a variable amount of records.

Critically, this validation scheme skips the needs to interrogate the
cxl_mem_commands array which in turn frees up the implementation to
support internal command enabling without also enabling external / user
commands.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/167030055918.4044561.10339573829837910505.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>