[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/4] hw/arm/virt: Make block devices default to virt
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH 4/4] hw/arm/virt: Make block devices default to virtio |
Date: |
Fri, 12 Jun 2015 14:26:15 +0100 |
Now we have virtio-pci, we can make the virt board's default block
device type be IF_VIRTIO. This allows users to use simplified
command lines that don't have to explicitly create virtio-pci-blk
devices; the -hda &c very short options now also work.
This means we also need to set no_cdrom to avoid getting a
default cdrom device -- this is needed because the virtio-blk
device will fail if it is connected to a block backend with
no media, which is what the default cdrom device typically is.
Providing a cdrom with media via -cdrom will still work.
Signed-off-by: Peter Maydell <address@hidden>
---
hw/arm/virt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 1b1cc71..c42ca32 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -961,6 +961,8 @@ static void virt_class_init(ObjectClass *oc, void *data)
mc->init = machvirt_init;
mc->max_cpus = 8;
mc->has_dynamic_sysbus = true;
+ mc->block_default_type = IF_VIRTIO;
+ mc->no_cdrom = 1;
}
static const TypeInfo machvirt_info = {
--
1.9.1
[Qemu-devel] [PATCH 2/4] qdev-properties-system: Change set_pointer's parse callback to use Error, Peter Maydell, 2015/06/12
Re: [Qemu-devel] [PATCH 0/4] block: Improve warnings for doubly-connected drives, Peter Maydell, 2015/06/19