summary refs log tree commit diff stats
path: root/gitlab/issues_text/target_missing/host_missing/accel_missing/665
blob: ef5f8d563a17c9a126bcfbd74e1c1e5131edd326 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 <k.jensen@samsung.com>
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 <k.jensen@samsung.com>
    Reviewed-by: Keith Busch <kbusch@kernel.org>
    Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>

 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.