diff options
author | Dan Williams <dan.j.williams@intel.com> | 2022-12-05 20:22:39 -0800 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2022-12-06 14:36:02 -0800 |
commit | 2aeaf663b85e436dc6287692b7561ffbf0aa4381 (patch) | |
tree | f22c62b322bca595061d2104c69cfb4ba2c78927 /include/trace | |
parent | 5331cdf44dc389ac56f7ba5c24ca52d13eaad8d7 (diff) | |
download | linux-stable-2aeaf663b85e436dc6287692b7561ffbf0aa4381.tar.gz linux-stable-2aeaf663b85e436dc6287692b7561ffbf0aa4381.tar.bz2 linux-stable-2aeaf663b85e436dc6287692b7561ffbf0aa4381.zip |
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>
Diffstat (limited to 'include/trace')
0 files changed, 0 insertions, 0 deletions