[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/53] hw/cxl: Move CXLRetCode definition to cxl_device.h
From: |
Michael S. Tsirkin |
Subject: |
[PULL 06/53] hw/cxl: Move CXLRetCode definition to cxl_device.h |
Date: |
Mon, 26 Jun 2023 08:28:04 -0400 |
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Following patches will need access to the mailbox return code
type so move it to the header.
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20230530133603.16934-3-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/cxl/cxl_device.h | 28 ++++++++++++++++++++++++++++
hw/cxl/cxl-mailbox-utils.c | 28 ----------------------------
2 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/include/hw/cxl/cxl_device.h b/include/hw/cxl/cxl_device.h
index 16993f7098..9f8ee85f8a 100644
--- a/include/hw/cxl/cxl_device.h
+++ b/include/hw/cxl/cxl_device.h
@@ -83,6 +83,34 @@
(CXL_DEVICE_CAP_REG_SIZE + CXL_DEVICE_STATUS_REGISTERS_LENGTH + \
CXL_MAILBOX_REGISTERS_LENGTH + CXL_MEMORY_DEVICE_REGISTERS_LENGTH)
+/* 8.2.8.4.5.1 Command Return Codes */
+typedef enum {
+ CXL_MBOX_SUCCESS = 0x0,
+ CXL_MBOX_BG_STARTED = 0x1,
+ CXL_MBOX_INVALID_INPUT = 0x2,
+ CXL_MBOX_UNSUPPORTED = 0x3,
+ CXL_MBOX_INTERNAL_ERROR = 0x4,
+ CXL_MBOX_RETRY_REQUIRED = 0x5,
+ CXL_MBOX_BUSY = 0x6,
+ CXL_MBOX_MEDIA_DISABLED = 0x7,
+ CXL_MBOX_FW_XFER_IN_PROGRESS = 0x8,
+ CXL_MBOX_FW_XFER_OUT_OF_ORDER = 0x9,
+ CXL_MBOX_FW_AUTH_FAILED = 0xa,
+ CXL_MBOX_FW_INVALID_SLOT = 0xb,
+ CXL_MBOX_FW_ROLLEDBACK = 0xc,
+ CXL_MBOX_FW_REST_REQD = 0xd,
+ CXL_MBOX_INVALID_HANDLE = 0xe,
+ CXL_MBOX_INVALID_PA = 0xf,
+ CXL_MBOX_INJECT_POISON_LIMIT = 0x10,
+ CXL_MBOX_PERMANENT_MEDIA_FAILURE = 0x11,
+ CXL_MBOX_ABORTED = 0x12,
+ CXL_MBOX_INVALID_SECURITY_STATE = 0x13,
+ CXL_MBOX_INCORRECT_PASSPHRASE = 0x14,
+ CXL_MBOX_UNSUPPORTED_MAILBOX = 0x15,
+ CXL_MBOX_INVALID_PAYLOAD_LENGTH = 0x16,
+ CXL_MBOX_MAX = 0x17
+} CXLRetCode;
+
typedef struct cxl_device_state {
MemoryRegion device_registers;
diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c
index e3401b6be8..d7e114aaae 100644
--- a/hw/cxl/cxl-mailbox-utils.c
+++ b/hw/cxl/cxl-mailbox-utils.c
@@ -68,34 +68,6 @@ enum {
#define CLEAR_POISON 0x2
};
-/* 8.2.8.4.5.1 Command Return Codes */
-typedef enum {
- CXL_MBOX_SUCCESS = 0x0,
- CXL_MBOX_BG_STARTED = 0x1,
- CXL_MBOX_INVALID_INPUT = 0x2,
- CXL_MBOX_UNSUPPORTED = 0x3,
- CXL_MBOX_INTERNAL_ERROR = 0x4,
- CXL_MBOX_RETRY_REQUIRED = 0x5,
- CXL_MBOX_BUSY = 0x6,
- CXL_MBOX_MEDIA_DISABLED = 0x7,
- CXL_MBOX_FW_XFER_IN_PROGRESS = 0x8,
- CXL_MBOX_FW_XFER_OUT_OF_ORDER = 0x9,
- CXL_MBOX_FW_AUTH_FAILED = 0xa,
- CXL_MBOX_FW_INVALID_SLOT = 0xb,
- CXL_MBOX_FW_ROLLEDBACK = 0xc,
- CXL_MBOX_FW_REST_REQD = 0xd,
- CXL_MBOX_INVALID_HANDLE = 0xe,
- CXL_MBOX_INVALID_PA = 0xf,
- CXL_MBOX_INJECT_POISON_LIMIT = 0x10,
- CXL_MBOX_PERMANENT_MEDIA_FAILURE = 0x11,
- CXL_MBOX_ABORTED = 0x12,
- CXL_MBOX_INVALID_SECURITY_STATE = 0x13,
- CXL_MBOX_INCORRECT_PASSPHRASE = 0x14,
- CXL_MBOX_UNSUPPORTED_MAILBOX = 0x15,
- CXL_MBOX_INVALID_PAYLOAD_LENGTH = 0x16,
- CXL_MBOX_MAX = 0x17
-} CXLRetCode;
-
struct cxl_cmd;
typedef CXLRetCode (*opcode_handler)(struct cxl_cmd *cmd,
CXLDeviceState *cxl_dstate, uint16_t *len);
--
MST
- [PULL 00/53] virtio,pc,pci: fixes, features, cleanups, Michael S. Tsirkin, 2023/06/26
- [PULL 01/53] bswap: Add the ability to store to an unaligned 24 bit field, Michael S. Tsirkin, 2023/06/26
- [PULL 02/53] hw/cxl: QMP based poison injection support, Michael S. Tsirkin, 2023/06/26
- [PULL 03/53] hw/cxl: Add poison injection via the mailbox., Michael S. Tsirkin, 2023/06/26
- [PULL 04/53] hw/cxl: Add clear poison mailbox command support., Michael S. Tsirkin, 2023/06/26
- [PULL 05/53] hw/cxl/events: Add event status register, Michael S. Tsirkin, 2023/06/26
- [PULL 06/53] hw/cxl: Move CXLRetCode definition to cxl_device.h,
Michael S. Tsirkin <=
- [PULL 07/53] hw/cxl/events: Wire up get/clear event mailbox commands, Michael S. Tsirkin, 2023/06/26
- [PULL 08/53] hw/cxl/events: Add event interrupt support, Michael S. Tsirkin, 2023/06/26
- [PULL 09/53] hw/cxl/events: Add injection of General Media Events, Michael S. Tsirkin, 2023/06/26
- [PULL 10/53] hw/cxl/events: Add injection of DRAM events, Michael S. Tsirkin, 2023/06/26
- [PULL 11/53] hw/cxl/events: Add injection of Memory Module Events, Michael S. Tsirkin, 2023/06/26
- [PULL 12/53] cryptodev-vhost-user: add asymmetric crypto support, Michael S. Tsirkin, 2023/06/26
- [PULL 13/53] softmmu: Introduce qemu_target_page_mask() helper, Michael S. Tsirkin, 2023/06/26
- [PULL 15/53] hw/scsi: Rearrange meson.build, Michael S. Tsirkin, 2023/06/26
- [PULL 18/53] hw/virtio/virtio-mem: Use qemu_ram_get_fd() helper, Michael S. Tsirkin, 2023/06/26
- [PULL 14/53] hw/scsi: Introduce VHOST_SCSI_COMMON symbol in Kconfig, Michael S. Tsirkin, 2023/06/26