diff options
author | Klaus Jensen <k.jensen@samsung.com> | 2020-07-06 08:12:51 +0200 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2020-09-02 08:48:50 +0200 |
commit | 42a42e4610ab9e4ca0bcc976f4b19f9f612a085e (patch) | |
tree | 5871168633ccf2b16545769b976be41d6ba3abda /hw | |
parent | 69ff06c49e9b0768bd68d887c2f29e8ff84dfaf3 (diff) | |
download | qemu-42a42e4610ab9e4ca0bcc976f4b19f9f612a085e.zip qemu-42a42e4610ab9e4ca0bcc976f4b19f9f612a085e.tar.gz qemu-42a42e4610ab9e4ca0bcc976f4b19f9f612a085e.tar.bz2 |
hw/block/nvme: mark fw slot 1 as read-only
Mark firmware slot 1 as read-only and only support that slot.
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20200706061303.246057-7-its@irrelevant.dk>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/nvme.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 38c6461..c970e41 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -61,6 +61,7 @@ #define NVME_TEMPERATURE 0x143 #define NVME_TEMPERATURE_WARNING 0x157 #define NVME_TEMPERATURE_CRITICAL 0x175 +#define NVME_NUM_FW_SLOTS 1 #define NVME_GUEST_ERR(trace, fmt, ...) \ do { \ @@ -1664,7 +1665,7 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev) * inconsequential. */ id->acl = 3; - id->frmw = 7 << 1; + id->frmw = (NVME_NUM_FW_SLOTS << 1) | NVME_FRMW_SLOT1_RO; id->lpa = 1 << 0; /* recommended default value (~70 C) */ |