On Fri, Jan 22, 2021 at 09:07:34PM +0900, Minwoo Im wrote: > index b525fca14103..3dedefb8ebba 100644 > --- a/hw/block/nvme.c > +++ b/hw/block/nvme.c > @@ -4435,6 +4435,9 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice > *pci_dev) > strpadcpy((char *)id->mn, sizeof(id->mn), "QEMU NVMe Ctrl", ' '); > strpadcpy((char *)id->fr, sizeof(id->fr), "1.0", ' '); > strpadcpy((char *)id->sn, sizeof(id->sn), n->params.serial, ' '); > + > + id->cntlid = n->cntlid;
cpu_to_le16()? It might be okay to not do that since the only requirement is that this is a unique value, but it would be confusing for decoding commands that have a controller id field.
