device: 0.360 graphic: 0.288 kernel: 0.283 mistranslation: 0.261 PID: 0.244 socket: 0.229 vnc: 0.177 boot: 0.160 risc-v: 0.160 register: 0.149 files: 0.118 ppc: 0.115 semantic: 0.114 permissions: 0.114 hypervisor: 0.100 virtual: 0.097 arm: 0.079 architecture: 0.078 network: 0.076 performance: 0.075 VMM: 0.074 debug: 0.065 i386: 0.062 x86: 0.060 peripherals: 0.056 TCG: 0.053 user-level: 0.053 assembly: 0.036 KVM: 0.032 Cannot boot from emulated NVMe with seabios Description of problem: SeaBIOS doesn't boot from NVMe disk. This is regression compared to version 5.1.0. The exact same SeaBIOS binary that works with QEMU 5.1.0, doesn't detect NVMe with QEMU 6.0.0, nor QEMU 6.1.0. Booting from NVMe via OVMF works on all those versions. Steps to reproduce: 1. Start the above command 2. Press ESC to open boot menu in SeaBIOS 3. Observe lack of NVMe entry Additional information: I've bisected it to this commit: ``` 7f0f1acedf159d00684d495d7a14d52220c1d16b is the first bad commit commit 7f0f1acedf159d00684d495d7a14d52220c1d16b Author: Klaus Jensen Date: Wed Jun 26 08:51:06 2019 +0200 hw/block/nvme: support multiple namespaces This adds support for multiple namespaces by introducing a new 'nvme-ns' device model. The nvme device creates a bus named from the device name ('id'). The nvme-ns devices then connect to this and registers themselves with the nvme device. This changes how an nvme device is created. Example with two namespaces: -drive file=nvme0n1.img,if=none,id=disk1 -drive file=nvme0n2.img,if=none,id=disk2 -device nvme,serial=deadbeef,id=nvme0 -device nvme-ns,drive=disk1,bus=nvme0,nsid=1 -device nvme-ns,drive=disk2,bus=nvme0,nsid=2 The drive property is kept on the nvme device to keep the change backward compatible, but the property is now optional. Specifying a drive for the nvme device will always create the namespace with nsid 1. Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch Reviewed-by: Minwoo Im hw/block/meson.build | 2 +- hw/block/nvme-ns.c | 167 ++++++++++++++++++++++++++++++++++ hw/block/nvme-ns.h | 74 +++++++++++++++ hw/block/nvme.c | 245 ++++++++++++++++++++++++++++++++------------------ hw/block/nvme.h | 46 +++++----- hw/block/trace-events | 6 +- 6 files changed, 426 insertions(+), 114 deletions(-) create mode 100644 hw/block/nvme-ns.c create mode 100644 hw/block/nvme-ns.h ``` Using `-device nvme-ns` as shown above doesn't help either.