qemu/include/hw/cxl
Hyeonggon Yoo 75b800dd3b hw/cxl/mbox: replace sanitize_running() with cxl_dev_media_disabled()
The spec states that reads/writes should have no effect and a part of
commands should be ignored when the media is disabled, not when the
sanitize command is running.

Introduce cxl_dev_media_disabled() to check if the media is disabled and
replace sanitize_running() with it.

Make sure that the media has been correctly disabled during sanitation
by adding an assert to __toggle_media(). Now, enabling when already
enabled or vice versa results in an assert() failure.

Suggested-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Link: https://lore.kernel.org/r/20231222090051.3265307-4-42.hyeyoo@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Message-Id: <20240705120643.959422-3-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-07-21 14:31:59 -04:00
..
cxl_cdat.h hw/mem/cxl_type3: Fix problem with g_steal_pointer() 2024-03-09 18:56:37 +03:00
cxl_component.h hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean 2024-04-25 12:48:12 +02:00
cxl_device.h hw/cxl/mbox: replace sanitize_running() with cxl_dev_media_disabled() 2024-07-21 14:31:59 -04:00
cxl_events.h hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents 2024-07-01 17:16:04 -04:00
cxl_host.h hw/cxl: Clean up includes 2023-02-08 07:16:23 +01:00
cxl_pci.h hw/cxl: Fix missing reserved data in CXL Device DVSEC 2024-03-12 17:59:48 -04:00
cxl.h hw/cxl/mbox: Add Physical Switch Identify command. 2023-11-07 03:39:11 -05:00