3 #include "block/nvme.h"
5 typedef struct NvmeAsyncEvent
{
6 QSIMPLEQ_ENTRY(NvmeAsyncEvent
) entry
;
10 typedef struct NvmeRequest
{
11 struct NvmeSQueue
*sq
;
19 QTAILQ_ENTRY(NvmeRequest
)entry
;
22 typedef struct NvmeSQueue
{
23 struct NvmeCtrl
*ctrl
;
32 QTAILQ_HEAD(sq_req_list
, NvmeRequest
) req_list
;
33 QTAILQ_HEAD(out_req_list
, NvmeRequest
) out_req_list
;
34 QTAILQ_ENTRY(NvmeSQueue
) entry
;
37 typedef struct NvmeCQueue
{
38 struct NvmeCtrl
*ctrl
;
48 QTAILQ_HEAD(sq_list
, NvmeSQueue
) sq_list
;
49 QTAILQ_HEAD(cq_req_list
, NvmeRequest
) req_list
;
52 typedef struct NvmeNamespace
{
56 #define TYPE_NVME "nvme"
58 OBJECT_CHECK(NvmeCtrl, (obj), TYPE_NVME)
60 typedef struct NvmeCtrl
{
63 MemoryRegion ctrl_mem
;
69 uint16_t max_prp_ents
;
73 uint32_t num_namespaces
;
84 NvmeNamespace
*namespaces
;
92 #endif /* HW_NVME_H */