summaryrefslogtreecommitdiffstats
path: root/block/nvme.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/nvme.c')
-rw-r--r--block/nvme.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/block/nvme.c b/block/nvme.c
index e95d59d312..b0629f5de8 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -41,6 +41,16 @@
typedef struct BDRVNVMeState BDRVNVMeState;
+/* Same index is used for queues and IRQs */
+#define INDEX_ADMIN 0
+#define INDEX_IO(n) (1 + n)
+
+/* This driver shares a single MSIX IRQ for the admin and I/O queues */
+enum {
+ MSIX_SHARED_IRQ_IDX = 0,
+ MSIX_IRQ_COUNT = 1
+};
+
typedef struct {
int32_t head, tail;
uint8_t *queue;
@@ -81,15 +91,6 @@ typedef struct {
QEMUBH *completion_bh;
} NVMeQueuePair;
-#define INDEX_ADMIN 0
-#define INDEX_IO(n) (1 + n)
-
-/* This driver shares a single MSIX IRQ for the admin and I/O queues */
-enum {
- MSIX_SHARED_IRQ_IDX = 0,
- MSIX_IRQ_COUNT = 1
-};
-
struct BDRVNVMeState {
AioContext *aio_context;
QEMUVFIOState *vfio;