hw/cxl: Add get scan media results cmd support
authorDavidlohr Bueso <dave@stgolabs.net>
Fri, 5 Jul 2024 12:06:43 +0000 (13:06 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 21 Jul 2024 18:31:59 +0000 (14:31 -0400)
commit89b5cfcc31e655a40919698a7f95a9208d6f12a3
treec2eb3b63291b76ca86638d182906531807720372
parent7d65874ba0ea8cdb2a5ac51c397d721d7d49d828
hw/cxl: Add get scan media results cmd support

Iterate over the list keeping the output payload size into account,
returning the results from a previous scan media operation. The
scan media operation does not fail prematurely due to device being
out of storage, so this implementation does not deal with the
retry/restart functionality.

Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Link: https://lore.kernel.org/r/20230908073152.4386-5-dave@stgolabs.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705120643.959422-5-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
include/hw/cxl/cxl_device.h