mirror of
https://github.com/qemu/qemu.git
synced 2025-08-15 05:06:56 +00:00
block/nvme: Use generic NvmeBar structure
Commitf3c507adcd
("NVMe: Initial commit for new storage interface") introduced the NvmeBar structure. Unfortunately in commitbdd6a90a9e
("block: Add VFIO based NVMe driver") we duplicated it. Apparently in commita3d9a352d4
("block: Move NVMe constants to a separate header") we tried to unify headers but forgot to remove the structure declared in the block/nvme.c source file. Do it now, and remove the structure size check which is redundant with the header check added in commit74e18435c0
("hw/block/nvme: Align I/O BAR to 4 KiB"). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200904124130.583838-3-philmd@redhat.com> Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Fam Zheng <fam@euphon.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
0ea32f34ce
commit
c7100f0a0b
20
block/nvme.c
20
block/nvme.c
@ -83,28 +83,10 @@ typedef struct {
|
|||||||
|
|
||||||
/* Memory mapped registers */
|
/* Memory mapped registers */
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
struct {
|
NvmeBar ctrl;
|
||||||
uint64_t cap;
|
|
||||||
uint32_t vs;
|
|
||||||
uint32_t intms;
|
|
||||||
uint32_t intmc;
|
|
||||||
uint32_t cc;
|
|
||||||
uint32_t reserved0;
|
|
||||||
uint32_t csts;
|
|
||||||
uint32_t nssr;
|
|
||||||
uint32_t aqa;
|
|
||||||
uint64_t asq;
|
|
||||||
uint64_t acq;
|
|
||||||
uint32_t cmbloc;
|
|
||||||
uint32_t cmbsz;
|
|
||||||
uint8_t reserved1[0xec0];
|
|
||||||
uint8_t cmd_set_specfic[0x100];
|
|
||||||
} ctrl;
|
|
||||||
uint32_t doorbells[];
|
uint32_t doorbells[];
|
||||||
} NVMeRegs;
|
} NVMeRegs;
|
||||||
|
|
||||||
QEMU_BUILD_BUG_ON(offsetof(NVMeRegs, doorbells) != 0x1000);
|
|
||||||
|
|
||||||
#define INDEX_ADMIN 0
|
#define INDEX_ADMIN 0
|
||||||
#define INDEX_IO(n) (1 + n)
|
#define INDEX_IO(n) (1 + n)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user