mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
hw/cxl/mbox: Split mailbox command payload into separate input and output
New CCI types that will be supported shortly do not have a single buffer used in both directions. As such, split it up. To avoid the complexities of implementing all commands to handle potential aliasing, take a copy of the input before use. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20231023160806.13206-3-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
a7bb53b1ee
commit
6f59274e93
+1
-1
@@ -143,7 +143,7 @@ bool cxl_event_insert(CXLDeviceState *cxlds, CXLEventLogType log_type,
|
||||
|
||||
CXLRetCode cxl_event_get_records(CXLDeviceState *cxlds, CXLGetEventPayload *pl,
|
||||
uint8_t log_type, int max_recs,
|
||||
uint16_t *len)
|
||||
size_t *len)
|
||||
{
|
||||
CXLEventLog *log;
|
||||
CXLEvent *entry;
|
||||
|
||||
+135
-95
File diff suppressed because it is too large
Load Diff
@@ -114,8 +114,9 @@ typedef enum {
|
||||
typedef struct cxl_device_state CXLDeviceState;
|
||||
struct cxl_cmd;
|
||||
typedef CXLRetCode (*opcode_handler)(const struct cxl_cmd *cmd,
|
||||
uint8_t *payload,
|
||||
CXLDeviceState *cxl_dstate, uint16_t *len);
|
||||
uint8_t *payload_in, size_t len_in,
|
||||
uint8_t *payload_out, size_t *len_out,
|
||||
CXLDeviceState *cxl_dstate);
|
||||
struct cxl_cmd {
|
||||
const char *name;
|
||||
opcode_handler handler;
|
||||
@@ -390,7 +391,7 @@ bool cxl_event_insert(CXLDeviceState *cxlds, CXLEventLogType log_type,
|
||||
CXLEventRecordRaw *event);
|
||||
CXLRetCode cxl_event_get_records(CXLDeviceState *cxlds, CXLGetEventPayload *pl,
|
||||
uint8_t log_type, int max_recs,
|
||||
uint16_t *len);
|
||||
size_t *len);
|
||||
CXLRetCode cxl_event_clear_records(CXLDeviceState *cxlds,
|
||||
CXLClearEventPayload *pl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user