Skip to content

RFC "bootonceindex" property

Janne Huttunen qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Re-factor bootdevice list handling, pt1.bootdevice.c+35 -140 replies
2/6Re-factor bootdevice list handling, pt2.bootdevice.c+24 -120 replies
3/6Add support for "bootonceindex" property.bootdevice.c include/sysemu/sysemu.h+13 -10 replies
4/6Clear the boot once list after it has been used.bootdevice.c hw/nvram/fw_cfg.c hw/ppc/spapr.c +2 more+29 -40 replies
5/6Support "bootonceindex" property for virtio-net interfaces.hw/net/virtio-net.c hw/virtio/virtio-pci.c include/net/net.h+6 -00 replies
6/6Support "bootonceindex" property for SCSI disks.hw/scsi/scsi-bus.c include/hw/block/block.h+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property

This series implements a "bootonceindex" property for setting the boot source priorities for the next boot only. In principle it is supposed to do the same thing as the '-boot once=' argument but in a compatible way with the 'bootindex' mechanism.

The basic idea is to have a second list that is sorted by the values of the "bootonceindex" properties. When the boot order is requested, the new list is returned if it is not empty and the list is cleared. The normal bootindex list is only used when there are no devices on the "once" list.

So far I have only added the support for a couple of devices and lightly tested it on x86_64 system emulation.

Some questions:

- Is there already some (reasonable) way to accomplish the same effect in QEMU?

- Does this approach make sense? Any better ideas?

- Any suggestions for better function / property names?

- Should the series be split or squashed differently? I tried to make it easy to review, but...

- Are the object life times (no dangling pointers left behind) and (lack of) locking correct? As far as I can see, they should be, but someone with more experience with this codebase may see something I don't...

- If this approach is going to be merged, any volunteers for converting the rest of the devices? Or can the conversion be left to be done one by one at some later date? I can try to convert more of them, but testing them all is likely not going to be possible.

- Any other suggestions/ideas/comments?

Janne Huttunen (6):
Re-factor bootdevice list handling, pt1. Re-factor bootdevice list handling, pt2.
Add support for "bootonceindex" property.
Clear the boot once list after it has been used. Support "bootonceindex" property for virtio-net interfaces. Support "bootonceindex" property for SCSI disks.

 bootdevice.c             | 112 ++++++++++++++++++++++++++++++++++++-----------
 hw/net/virtio-net.c      |   3 ++
 hw/nvram/fw_cfg.c        |   2 +
 hw/ppc/spapr.c           |   2 +
 hw/s390x/ipl.c           |   2 +
 hw/scsi/scsi-bus.c       |   3 ++
 hw/virtio/virtio-pci.c   |   2 +
 include/hw/block/block.h |   1 +
 include/net/net.h        |   1 +
 include/sysemu/sysemu.h  |   4 ++
 10 files changed, 106 insertions(+), 26 deletions(-)
Signature · 1 line
2.7.4