]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cxl: Add support for fwctl RPC command to enable CXL feature commands
authorDave Jiang <dave.jiang@intel.com>
Fri, 7 Mar 2025 20:55:33 +0000 (13:55 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 17 Mar 2025 17:41:37 +0000 (14:41 -0300)
commit4d1c09cef2c244bd19467c016a3e56ba28ecc59d
treeea90c22b90014a9d9808a5ccd13fe70b8cd10df1
parent9b8e73cdb1418f7c251c43b2082218ed9c0d0fee
cxl: Add support for fwctl RPC command to enable CXL feature commands

fwctl provides a fwctl_ops->fw_rpc() callback in order to issue ioctls
to a device. The cxl fwctl driver will start by supporting the CXL
Feature commands: Get Supported Features, Get Feature, and Set Feature.

The fw_rpc() callback provides 'enum fwctl_rpc_scope' parameter where
it indicates the security scope of the call. The Get Supported Features
and Get Feature calls can be executed with the scope of
FWCTL_RPC_CONFIGRATION. The Set Feature call is gated by the effects
of the Feature reported by Get Supported Features call for the specific
Feature.

Only "Get Supported Features" is supported in this patch. Additional
commands will be added in follow on patches. "Get Supported Features"
will filter the Features that are exclusive to the kernel. The flag
field of the Feature details will be cleared of the "Changeable"
field and the "set feat size" will be set to 0 to indicate that
the feature is not changeable.

Link: https://patch.msgid.link/r/20250307205648.1021626-4-dave.jiang@intel.com
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/cxl/core/features.c
include/uapi/cxl/features.h
include/uapi/fwctl/cxl.h [new file with mode: 0644]