]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/cxl/mbox: Generalize the CCI command processing
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 23 Oct 2023 16:07:53 +0000 (17:07 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 7 Nov 2023 08:39:11 +0000 (03:39 -0500)
commitc9460561edbd8b2d4adbf1f7c5cb4ad4d210de4c
tree350146e485148047c5aea72232fe0043e1db6947
parentcac36a8faffc62ba6b07d8e9dfdc9fbf15c7d1bf
hw/cxl/mbox: Generalize the CCI command processing

By moving the parts of the mailbox command handling that are CCI type
specific out to the caller, make the main handling code generic. Rename it
to cxl_process_cci_message() to reflect this new generality.

Change the type3 mailbox handling (reused shortly for the switch
mailbox CCI) to take a snapshot of the mailbox input data rather
than operating on it in place.  This reduces the chance of bugs
due to aliasing going forwars.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20231023160806.13206-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-device-utils.c
hw/cxl/cxl-mailbox-utils.c
include/hw/cxl/cxl_device.h