hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature
authorShiju Jose <shiju.jose@huawei.com>
Fri, 5 Jul 2024 12:30:37 +0000 (13:30 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 21 Jul 2024 18:31:59 +0000 (14:31 -0400)
commitd88f667414106c7216485774293d0831c2482d20
treeb03116aaea3a4bc6b45e7af5d03a0b38399b1db7
parentd80378943a6b88b8d211e1468073d9dd44239e27
hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

CXL spec 3.1 section 8.2.9.9.11.1 describes the device patrol scrub control
feature. The device patrol scrub proactively locates and makes corrections
to errors in regular cycle. The patrol scrub control allows the request to
configure patrol scrub input configurations.

The patrol scrub control allows the requester to specify the number of
hours for which the patrol scrub cycles must be completed, provided that
the requested number is not less than the minimum number of hours for the
patrol scrub cycle that the device is capable of. In addition, the patrol
scrub controls allow the host to disable and enable the feature in case
disabling of the feature is needed for other purposes such as
performance-aware operations which require the background operations to be
turned off.

Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Link: https://lore.kernel.org/r/20240223085902.1549-3-shiju.jose@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705123039.963781-4-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/cxl/cxl-mailbox-utils.c
hw/mem/cxl_type3.c
include/hw/cxl/cxl_device.h