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

Use simple heuristics to determine the cost of scanning any given
chunk, assuming cost is equal across the whole device, without
differentiating between volatile or persistent partitions. This
is aligned to the fact that these constraints are not enforced
in respective poison query commands.

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