]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/xen: automatically assign device index to block devices
authorDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 16 Oct 2023 12:01:39 +0000 (13:01 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 6 Nov 2023 10:03:45 +0000 (10:03 +0000)
commit19794af201f5c856e1750c3f6a94558b1517a81e
tree4cf8d01be3d63a5efcd5e6fd426d2089e8981c6c
parentd5f536008e0b6bd4056c6020fa1d635aaa57177f
hw/xen: automatically assign device index to block devices

There's no need to force the user to assign a vdev. We can automatically
assign one, starting at xvda and searching until we find the first disk
name that's unused.

This means we can now allow '-drive if=xen,file=xxx' to work without an
explicit separate -driver argument, just like if=virtio.

Rip out the legacy handling from the xenpv machine, which was scribbling
over any disks configured by the toolstack, and didn't work with anything
but raw images.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Kevin Wolf <kwolf@redhat.com>
blockdev.c
hw/block/xen-block.c
hw/xen/xen_devconfig.c
hw/xenpv/xen_machine_pv.c
include/hw/xen/xen-legacy-backend.h