mirror of https://gitee.com/openkylin/libvirt.git
tests: qemu: Couple aarch64 CPU tests
- Make sure aarch64 host-passthrough works correctly - Make sure libvirt doesn't choke on cpu model=host, which is what virt-install/virt-manager were incorrectly specifying up until recently.
This commit is contained in:
parent
aa9f139599
commit
7b9de91404
|
@ -0,0 +1,5 @@
|
||||||
|
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||||
|
/usr/bin/qemu-system-aarch64 -S -M virt -cpu host -m 1024 -smp 1 -nographic \
|
||||||
|
-nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \
|
||||||
|
-boot c -usb -drive file=/aarch64.raw,if=none,id=drive-virtio-disk0 \
|
||||||
|
-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0
|
|
@ -0,0 +1,28 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>aarch64test</name>
|
||||||
|
<uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid>
|
||||||
|
<memory unit='KiB'>1048576</memory>
|
||||||
|
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||||
|
<vcpu placement='static'>1</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='aarch64' machine='virt'>hvm</type>
|
||||||
|
<boot dev='hd'/>
|
||||||
|
</os>
|
||||||
|
<features>
|
||||||
|
<acpi/>
|
||||||
|
<apic/>
|
||||||
|
<pae/>
|
||||||
|
</features>
|
||||||
|
<cpu mode='host-passthrough'/>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>restart</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||||
|
<disk type='file' device='disk'>
|
||||||
|
<source file='/aarch64.raw'/>
|
||||||
|
<target dev='vda' bus='virtio'/>
|
||||||
|
</disk>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,5 @@
|
||||||
|
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||||
|
/usr/bin/qemu-system-aarch64 -S -M virt -cpu host -m 1024 -smp 1 -nographic \
|
||||||
|
-nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \
|
||||||
|
-boot c -usb -drive file=/aarch64.raw,if=none,id=drive-virtio-disk0 \
|
||||||
|
-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0
|
|
@ -0,0 +1,27 @@
|
||||||
|
<domain type="kvm">
|
||||||
|
<name>aarch64test</name>
|
||||||
|
<uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid>
|
||||||
|
<memory>1048576</memory>
|
||||||
|
<currentMemory>1048576</currentMemory>
|
||||||
|
<vcpu placement='static'>1</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch="aarch64" machine="virt">hvm</type>
|
||||||
|
</os>
|
||||||
|
<features>
|
||||||
|
<acpi/>
|
||||||
|
<apic/>
|
||||||
|
<pae/>
|
||||||
|
</features>
|
||||||
|
<cpu mode='host-passthrough'/>
|
||||||
|
<clock offset="utc"/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>restart</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||||
|
<disk type='file' device='disk'>
|
||||||
|
<source file='/aarch64.raw'/>
|
||||||
|
<target dev='vda' bus='virtio'/>
|
||||||
|
</disk>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -1525,6 +1525,12 @@ mymain(void)
|
||||||
DO_TEST("aarch64-virt-default-nic",
|
DO_TEST("aarch64-virt-default-nic",
|
||||||
QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG,
|
QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG,
|
||||||
QEMU_CAPS_DEVICE_VIRTIO_MMIO);
|
QEMU_CAPS_DEVICE_VIRTIO_MMIO);
|
||||||
|
DO_TEST("aarch64-cpu-passthrough", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE,
|
||||||
|
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
||||||
|
QEMU_CAPS_CPU_HOST, QEMU_CAPS_KVM);
|
||||||
|
DO_TEST("aarch64-cpu-model-host", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE,
|
||||||
|
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
||||||
|
QEMU_CAPS_CPU_HOST, QEMU_CAPS_KVM);
|
||||||
|
|
||||||
DO_TEST("kvm-pit-device", QEMU_CAPS_KVM_PIT_TICK_POLICY);
|
DO_TEST("kvm-pit-device", QEMU_CAPS_KVM_PIT_TICK_POLICY);
|
||||||
DO_TEST("kvm-pit-delay", QEMU_CAPS_NO_KVM_PIT);
|
DO_TEST("kvm-pit-delay", QEMU_CAPS_NO_KVM_PIT);
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
<domain type="kvm">
|
||||||
|
<name>aarch64test</name>
|
||||||
|
<uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid>
|
||||||
|
<memory>1048576</memory>
|
||||||
|
<currentMemory>1048576</currentMemory>
|
||||||
|
<vcpu placement='static'>1</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch="aarch64" machine="virt">hvm</type>
|
||||||
|
</os>
|
||||||
|
<features>
|
||||||
|
<acpi/>
|
||||||
|
<apic/>
|
||||||
|
<pae/>
|
||||||
|
</features>
|
||||||
|
<cpu mode='host-passthrough'/>
|
||||||
|
<clock offset="utc"/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>restart</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||||
|
<disk type='file' device='disk'>
|
||||||
|
<source file='/aarch64.raw'/>
|
||||||
|
<target dev='vda' bus='virtio'/>
|
||||||
|
</disk>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -612,6 +612,8 @@ mymain(void)
|
||||||
DO_TEST("memory-hotplug-nonuma");
|
DO_TEST("memory-hotplug-nonuma");
|
||||||
DO_TEST("memory-hotplug-dimm");
|
DO_TEST("memory-hotplug-dimm");
|
||||||
|
|
||||||
|
DO_TEST("aarch64-cpu-model-host");
|
||||||
|
|
||||||
virObjectUnref(driver.caps);
|
virObjectUnref(driver.caps);
|
||||||
virObjectUnref(driver.xmlopt);
|
virObjectUnref(driver.xmlopt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue