diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-04 19:52:44 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-04 19:52:44 +0000 |
commit | 6e02c38dadfe4cf02b0da6135adfd8d9352b90e1 (patch) | |
tree | 6de8b1fa9342550d2c7da2be7aef83b80a17a4b0 /vl.c | |
parent | 967f97fa00b2d301584d08c614d446423c65c15a (diff) |
Add virtio-blk support
Virtio-blk is a paravirtual block device based on VirtIO. It can be used by
specifying the if=virtio parameter to the -drive parameter.
When using -enable-kvm, it can achieve very good performance compared to IDE or
SCSI.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5870 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2267,7 +2267,10 @@ static int drive_init(struct drive_opt *arg, int snapshot, } else if (!strcmp(buf, "sd")) { type = IF_SD; max_devs = 0; - } else { + } else if (!strcmp(buf, "virtio")) { + type = IF_VIRTIO; + max_devs = 0; + } else { fprintf(stderr, "qemu: '%s' unsupported bus type '%s'\n", str, buf); return -1; } @@ -2474,6 +2477,7 @@ static int drive_init(struct drive_opt *arg, int snapshot, break; case IF_PFLASH: case IF_MTD: + case IF_VIRTIO: break; } if (!file[0]) |