mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-02 06:32:54 -10:00
blockdev: with -drive if=virtio, use generic virtio-blk
Rather than checking if the machine is an s390x to use virtio-blk-ccw instead of virtio-blk-pci, use the alias virtio-blk that is set to the expected target. This also enables the use of virtio-blk-device for targets without PCI or CCW. Signed-off-by: Laurent Vivier <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Tested-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Acked-by: Markus Armbruster <[email protected]> Message-Id: <[email protected]> Message-Id: <[email protected]>
This commit is contained in:
1 parent
4c5806a56b
commit
9db1d3a2be
1 file changed
+1
-5
+1
-5
@@ -962,11 +962,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type,
|
||||
QemuOpts *devopts;
|
||||
devopts = qemu_opts_create(qemu_find_opts("device"), NULL, 0,
|
||||
&error_abort);
|
||||
if (arch_type == QEMU_ARCH_S390X) {
|
||||
qemu_opt_set(devopts, "driver", "virtio-blk-ccw", &error_abort);
|
||||
} else {
|
||||
qemu_opt_set(devopts, "driver", "virtio-blk-pci", &error_abort);
|
||||
}
|
||||
qemu_opt_set(devopts, "driver", "virtio-blk", &error_abort);
|
||||
qemu_opt_set(devopts, "drive", qdict_get_str(bs_opts, "id"),
|
||||
&error_abort);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user