hw/cxl/device: Add memory device utilities
authorBen Widawsky <ben.widawsky@intel.com>
Fri, 29 Apr 2022 14:40:32 +0000 (15:40 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 13 May 2022 10:13:36 +0000 (06:13 -0400)
commitce3b4e5c152fe1c05aaf03b5bbe7579338446318
tree072e8d3c9727104f24e513ede599290c248b3231
parent464e14ac438e21c532889d78caf54a1dc837012a
hw/cxl/device: Add memory device utilities

Memory devices implement extra capabilities on top of CXL devices. This
adds support for that.

A large part of memory devices is the mailbox/command interface. All of
the mailbox handling is done in the mailbox-utils library. Longer term,
new CXL devices that are being emulated may want to handle commands
differently, and therefore would need a mechanism to opt in/out of the
specific generic handlers. As such, this is considered sufficient for
now, but may need more depth in the future.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220429144110.25167-8-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/cxl/cxl-device-utils.c
include/hw/cxl/cxl_device.h