aboutsummaryrefslogtreecommitdiff
path: root/hw/xenpv
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2023-10-16 13:01:39 +0100
committerDavid Woodhouse <dwmw@amazon.co.uk>2023-11-07 08:54:20 +0000
commitd3256f88d988809ae006aa28d6df88b37b253bc1 (patch)
treee0fed0f29d7b33e952124c3af79abcd52c9a0ccf /hw/xenpv
parentd388c9f53b971fd185ee1dc2f4f3ca88abda906d (diff)
downloadqemu-d3256f88d988809ae006aa28d6df88b37b253bc1.zip
qemu-d3256f88d988809ae006aa28d6df88b37b253bc1.tar.gz
qemu-d3256f88d988809ae006aa28d6df88b37b253bc1.tar.bz2
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> Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'hw/xenpv')
-rw-r--r--hw/xenpv/xen_machine_pv.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
index 17cda5e..1533f5d 100644
--- a/hw/xenpv/xen_machine_pv.c
+++ b/hw/xenpv/xen_machine_pv.c
@@ -32,7 +32,6 @@
static void xen_init_pv(MachineState *machine)
{
- DriveInfo *dinfo;
int i;
setup_xen_backend_ops();
@@ -64,14 +63,6 @@ static void xen_init_pv(MachineState *machine)
vga_interface_created = true;
}
- /* configure disks */
- for (i = 0; i < 16; i++) {
- dinfo = drive_get(IF_XEN, 0, i);
- if (!dinfo)
- continue;
- xen_config_dev_blk(dinfo);
- }
-
/* configure nics */
for (i = 0; i < nb_nics; i++) {
if (!nd_table[i].model || 0 != strcmp(nd_table[i].model, "xen"))