cxl/mem: Introduce security state sysfs file
authorDavidlohr Bueso <dave@stgolabs.net>
Mon, 12 Jun 2023 18:10:33 +0000 (11:10 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 25 Jun 2023 21:54:51 +0000 (14:54 -0700)
commit9968c9dd568e83f57fdc1f6127f8b369a0594991
treef36542a860c24868caeeffa6995f70ad113476d1
parent8ea9c33d48f20479e87b5fc3a97cd25e656d30dc
cxl/mem: Introduce security state sysfs file

Add a read-only sysfs file to display the security state
of a device (currently only pmem):

    /sys/bus/cxl/devices/memX/security/state

This introduces a cxl_security_state structure that is
to be the placeholder for common CXL security features.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20230612181038.14421-3-dave@stgolabs.net
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Documentation/ABI/testing/sysfs-bus-cxl
drivers/cxl/core/memdev.c
drivers/cxl/cxlmem.h
drivers/cxl/security.c