mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
qemu: Add support for virt machine type with virtio-mmio devices on armv7
These changes allow the correct virtio-blk-device and virtio-net-device devices to be used for the 'virt' machine type for armv7 rather than the PCI virtio devices. A test case was added to qemuxml2argvtest for this change. Signed-off-by: Clark Laughlin <clark.laughlin@linaro.org>
This commit is contained in:
1 parent
78b139b0bd
commit
c7ccd2c44b
5 files changed
+69
-1
No files matched your search
@@ -0,0 +1,14 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu-system-arm -S -M virt -m 1024 -smp 1 -nographic \
|
||||
-nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \
|
||||
-boot c -kernel /arm.kernel -initrd /arm.initrd -append \
|
||||
'console=ttyAMA0,115200n8 rw root=/dev/vda rootwait physmap.enabled=0' \
|
||||
-dtb /arm.dtb -device virtio-serial-device,id=virtio-serial0 -usb \
|
||||
-drive file=/arm.raw,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \
|
||||
-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \
|
||||
-net user,vlan=0,name=hostnet0 -serial pty -chardev pty,id=charconsole1 \
|
||||
-device virtconsole,chardev=charconsole1,id=console1 \
|
||||
-device virtio-balloon-device,id=balloon0 \
|
||||
-object rng-random,id=rng0,filename=/dev/random \
|
||||
-device virtio-rng-device,rng=rng0
|
||||
@@ -0,0 +1,45 @@
|
||||
<domain type="qemu">
|
||||
<name>armtest</name>
|
||||
<uuid>496d7ea8-9739-544b-4ebd-ef08be936e6a</uuid>
|
||||
<memory>1048576</memory>
|
||||
<currentMemory>1048576</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch="armv7l" machine="virt">hvm</type>
|
||||
<kernel>/arm.kernel</kernel>
|
||||
<initrd>/arm.initrd</initrd>
|
||||
<dtb>/arm.dtb</dtb>
|
||||
<cmdline>console=ttyAMA0,115200n8 rw root=/dev/vda rootwait physmap.enabled=0</cmdline>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<pae/>
|
||||
</features>
|
||||
<clock offset="utc"/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-arm</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/arm.raw'/>
|
||||
<target dev='vda' bus='virtio'/>
|
||||
</disk>
|
||||
<interface type='user'>
|
||||
<mac address='52:54:00:09:a4:37'/>
|
||||
<model type='virtio'/>
|
||||
</interface>
|
||||
<console type='pty'/>
|
||||
<console type='pty'>
|
||||
<target type='virtio' port='0'/>
|
||||
</console>
|
||||
<memballoon model='virtio'/>
|
||||
<!--
|
||||
This actually doesn't work in practice because vexpress only has
|
||||
4 virtio slots available, rng makes 5 -->
|
||||
<rng model='virtio'>
|
||||
<backend model='random'>/dev/random</backend>
|
||||
</rng>
|
||||
</devices>
|
||||
</domain>
|
||||
@@ -1105,6 +1105,10 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB,
|
||||
QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
||||
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
|
||||
DO_TEST("arm-virt-virtio",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB,
|
||||
QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
||||
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
|
||||
|
||||
DO_TEST("kvm-pit-device", QEMU_CAPS_KVM_PIT_TICK_POLICY);
|
||||
DO_TEST("kvm-pit-delay", QEMU_CAPS_NO_KVM_PIT);
|
||||
|
||||
Reference in new issue
Block a user