diff options
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -2197,9 +2197,16 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque, break; case IF_PFLASH: case IF_MTD: - case IF_VIRTIO: case IF_NONE: break; + case IF_VIRTIO: + /* add virtio block device */ + opts = qemu_opts_create(&qemu_device_opts, NULL, 0); + qemu_opt_set(opts, "driver", "virtio-blk-pci"); + qemu_opt_set(opts, "drive", dinfo->id); + if (devaddr) + qemu_opt_set(opts, "addr", devaddr); + break; case IF_COUNT: abort(); } |