mirror of https://gitee.com/openkylin/libvirt.git
qemu: Set default values for CPU check attribute
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
641b8c721e
commit
fcd56ce866
|
@ -2674,6 +2674,45 @@ qemuDomainDefVcpusPostParse(virDomainDefPtr def)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
qemuDomainDefCPUPostParse(virDomainDefPtr def)
|
||||||
|
{
|
||||||
|
if (!def->cpu)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Nothing to be done if only CPU topology is specified. */
|
||||||
|
if (def->cpu->mode == VIR_CPU_MODE_CUSTOM &&
|
||||||
|
!def->cpu->model)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (def->cpu->check != VIR_CPU_CHECK_DEFAULT)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
switch ((virCPUMode) def->cpu->mode) {
|
||||||
|
case VIR_CPU_MODE_HOST_PASSTHROUGH:
|
||||||
|
def->cpu->check = VIR_CPU_CHECK_NONE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_CPU_MODE_HOST_MODEL:
|
||||||
|
def->cpu->check = VIR_CPU_CHECK_PARTIAL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_CPU_MODE_CUSTOM:
|
||||||
|
/* Custom CPUs in TCG mode are not compared to host CPU by default. */
|
||||||
|
if (def->virtType == VIR_DOMAIN_VIRT_QEMU)
|
||||||
|
def->cpu->check = VIR_CPU_CHECK_NONE;
|
||||||
|
else
|
||||||
|
def->cpu->check = VIR_CPU_CHECK_PARTIAL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_CPU_MODE_LAST:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainDefPostParse(virDomainDefPtr def,
|
qemuDomainDefPostParse(virDomainDefPtr def,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
|
@ -2738,6 +2777,9 @@ qemuDomainDefPostParse(virDomainDefPtr def,
|
||||||
if (qemuDomainDefVcpusPostParse(def) < 0)
|
if (qemuDomainDefVcpusPostParse(def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
if (qemuDomainDefCPUPostParse(def) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(qemuCaps);
|
virObjectUnref(qemuCaps);
|
||||||
|
|
|
@ -5192,14 +5192,11 @@ qemuProcessUpdateGuestCPU(virDomainDefPtr def,
|
||||||
if (def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH)
|
if (def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* custom CPUs in TCG mode don't need to be compared to host CPU */
|
if (def->cpu->check == VIR_CPU_CHECK_PARTIAL &&
|
||||||
if (def->virtType != VIR_DOMAIN_VIRT_QEMU ||
|
virCPUCompare(caps->host.arch,
|
||||||
def->cpu->mode != VIR_CPU_MODE_CUSTOM) {
|
virQEMUCapsGetHostModel(qemuCaps, def->virtType),
|
||||||
if (virCPUCompare(caps->host.arch,
|
def->cpu, true) < 0)
|
||||||
virQEMUCapsGetHostModel(qemuCaps, def->virtType),
|
return -1;
|
||||||
def->cpu, true) < 0)
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (virCPUUpdate(def->os.arch, def->cpu,
|
if (virCPUUpdate(def->os.arch, def->cpu,
|
||||||
virQEMUCapsGetHostModel(qemuCaps, def->virtType)) < 0)
|
virQEMUCapsGetHostModel(qemuCaps, def->virtType)) < 0)
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<features>
|
<features>
|
||||||
<gic version='host'/>
|
<gic version='host'/>
|
||||||
</features>
|
</features>
|
||||||
<cpu mode='host-passthrough'/>
|
<cpu mode='host-passthrough' check='none'/>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
<on_poweroff>destroy</on_poweroff>
|
<on_poweroff>destroy</on_poweroff>
|
||||||
<on_reboot>restart</on_reboot>
|
<on_reboot>restart</on_reboot>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<features>
|
<features>
|
||||||
<gic version='2'/>
|
<gic version='2'/>
|
||||||
</features>
|
</features>
|
||||||
<cpu mode='host-passthrough'/>
|
<cpu mode='host-passthrough' check='none'/>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
<on_poweroff>destroy</on_poweroff>
|
<on_poweroff>destroy</on_poweroff>
|
||||||
<on_reboot>restart</on_reboot>
|
<on_reboot>restart</on_reboot>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<features>
|
<features>
|
||||||
<gic version='3'/>
|
<gic version='3'/>
|
||||||
</features>
|
</features>
|
||||||
<cpu mode='host-passthrough'/>
|
<cpu mode='host-passthrough' check='none'/>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
<on_poweroff>destroy</on_poweroff>
|
<on_poweroff>destroy</on_poweroff>
|
||||||
<on_reboot>restart</on_reboot>
|
<on_reboot>restart</on_reboot>
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
LC_ALL=C \
|
||||||
|
PATH=/bin \
|
||||||
|
HOME=/home/test \
|
||||||
|
USER=test \
|
||||||
|
LOGNAME=test \
|
||||||
|
QEMU_AUDIO_DRV=none \
|
||||||
|
/usr/bin/qemu-kvm \
|
||||||
|
-name QEMUGuest1 \
|
||||||
|
-S \
|
||||||
|
-M pc \
|
||||||
|
-cpu host \
|
||||||
|
-m 214 \
|
||||||
|
-smp 6,sockets=6,cores=1,threads=1 \
|
||||||
|
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||||
|
-nographic \
|
||||||
|
-nodefaults \
|
||||||
|
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
||||||
|
-no-acpi \
|
||||||
|
-boot n \
|
||||||
|
-usb \
|
||||||
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|
|
@ -0,0 +1,19 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='host-passthrough'/>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,21 @@
|
||||||
|
LC_ALL=C \
|
||||||
|
PATH=/bin \
|
||||||
|
HOME=/home/test \
|
||||||
|
USER=test \
|
||||||
|
LOGNAME=test \
|
||||||
|
QEMU_AUDIO_DRV=none \
|
||||||
|
/usr/bin/qemu \
|
||||||
|
-name QEMUGuest1 \
|
||||||
|
-S \
|
||||||
|
-M pc \
|
||||||
|
-cpu core2duo \
|
||||||
|
-m 214 \
|
||||||
|
-smp 6,sockets=6,cores=1,threads=1 \
|
||||||
|
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||||
|
-nographic \
|
||||||
|
-nodefaults \
|
||||||
|
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
||||||
|
-no-acpi \
|
||||||
|
-boot n \
|
||||||
|
-usb \
|
||||||
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|
|
@ -0,0 +1,21 @@
|
||||||
|
<domain type='qemu'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='custom' match='exact'>
|
||||||
|
<model fallback='forbid'>core2duo</model>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu</emulator>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,22 @@
|
||||||
|
LC_ALL=C \
|
||||||
|
PATH=/bin \
|
||||||
|
HOME=/home/test \
|
||||||
|
USER=test \
|
||||||
|
LOGNAME=test \
|
||||||
|
QEMU_AUDIO_DRV=none \
|
||||||
|
/usr/bin/qemu-kvm \
|
||||||
|
-name QEMUGuest1 \
|
||||||
|
-S \
|
||||||
|
-M pc \
|
||||||
|
-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,\
|
||||||
|
+lahf_lm \
|
||||||
|
-m 214 \
|
||||||
|
-smp 6,sockets=6,cores=1,threads=1 \
|
||||||
|
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||||
|
-nographic \
|
||||||
|
-nodefaults \
|
||||||
|
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
||||||
|
-no-acpi \
|
||||||
|
-boot n \
|
||||||
|
-usb \
|
||||||
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|
|
@ -0,0 +1,19 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='host-model'/>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,21 @@
|
||||||
|
LC_ALL=C \
|
||||||
|
PATH=/bin \
|
||||||
|
HOME=/home/test \
|
||||||
|
USER=test \
|
||||||
|
LOGNAME=test \
|
||||||
|
QEMU_AUDIO_DRV=none \
|
||||||
|
/usr/bin/qemu-kvm \
|
||||||
|
-name QEMUGuest1 \
|
||||||
|
-S \
|
||||||
|
-M pc \
|
||||||
|
-cpu core2duo \
|
||||||
|
-m 214 \
|
||||||
|
-smp 6,sockets=6,cores=1,threads=1 \
|
||||||
|
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||||
|
-nographic \
|
||||||
|
-nodefaults \
|
||||||
|
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
||||||
|
-no-acpi \
|
||||||
|
-boot n \
|
||||||
|
-usb \
|
||||||
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|
|
@ -0,0 +1,21 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='custom' match='exact'>
|
||||||
|
<model fallback='forbid'>core2duo</model>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1 @@
|
||||||
|
qemuxml2argv-cpu-check-none.args
|
|
@ -0,0 +1,21 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='custom' match='exact' check='full'>
|
||||||
|
<model fallback='forbid'>core2duo</model>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,21 @@
|
||||||
|
LC_ALL=C \
|
||||||
|
PATH=/bin \
|
||||||
|
HOME=/home/test \
|
||||||
|
USER=test \
|
||||||
|
LOGNAME=test \
|
||||||
|
QEMU_AUDIO_DRV=none \
|
||||||
|
/usr/bin/qemu-kvm \
|
||||||
|
-name QEMUGuest1 \
|
||||||
|
-S \
|
||||||
|
-M pc \
|
||||||
|
-cpu core2duo \
|
||||||
|
-m 214 \
|
||||||
|
-smp 6,sockets=6,cores=1,threads=1 \
|
||||||
|
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||||
|
-nographic \
|
||||||
|
-nodefaults \
|
||||||
|
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
||||||
|
-no-acpi \
|
||||||
|
-boot n \
|
||||||
|
-usb \
|
||||||
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|
|
@ -0,0 +1,21 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='custom' match='exact' check='none'>
|
||||||
|
<model fallback='forbid'>core2duo</model>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1 @@
|
||||||
|
qemuxml2argv-cpu-check-none.args
|
|
@ -0,0 +1,21 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='custom' match='exact' check='partial'>
|
||||||
|
<model fallback='forbid'>core2duo</model>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -2488,6 +2488,14 @@ mymain(void)
|
||||||
DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_MEM_PATH, QEMU_CAPS_OBJECT_MEMORY_FILE,
|
DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_MEM_PATH, QEMU_CAPS_OBJECT_MEMORY_FILE,
|
||||||
QEMU_CAPS_KVM);
|
QEMU_CAPS_KVM);
|
||||||
|
|
||||||
|
DO_TEST("cpu-check-none", QEMU_CAPS_KVM);
|
||||||
|
DO_TEST("cpu-check-partial", QEMU_CAPS_KVM);
|
||||||
|
DO_TEST("cpu-check-full", QEMU_CAPS_KVM);
|
||||||
|
DO_TEST("cpu-check-default-none", QEMU_CAPS_KVM);
|
||||||
|
DO_TEST("cpu-check-default-none2", NONE);
|
||||||
|
DO_TEST("cpu-check-default-partial", QEMU_CAPS_KVM);
|
||||||
|
DO_TEST("cpu-check-default-partial2", QEMU_CAPS_KVM);
|
||||||
|
|
||||||
qemuTestDriverFree(&driver);
|
qemuTestDriverFree(&driver);
|
||||||
|
|
||||||
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<pae/>
|
<pae/>
|
||||||
<gic version='2'/>
|
<gic version='2'/>
|
||||||
</features>
|
</features>
|
||||||
<cpu mode='custom' match='exact'>
|
<cpu mode='custom' match='exact' check='none'>
|
||||||
<model fallback='allow'>cortex-a53</model>
|
<model fallback='allow'>cortex-a53</model>
|
||||||
</cpu>
|
</cpu>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<acpi/>
|
<acpi/>
|
||||||
<gic version='2'/>
|
<gic version='2'/>
|
||||||
</features>
|
</features>
|
||||||
<cpu mode='custom' match='exact'>
|
<cpu mode='custom' match='exact' check='none'>
|
||||||
<model fallback='allow'>cortex-a57</model>
|
<model fallback='allow'>cortex-a57</model>
|
||||||
</cpu>
|
</cpu>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<pae/>
|
<pae/>
|
||||||
<gic version='2'/>
|
<gic version='2'/>
|
||||||
</features>
|
</features>
|
||||||
<cpu mode='custom' match='exact'>
|
<cpu mode='custom' match='exact' check='none'>
|
||||||
<model fallback='allow'>cortex-a53</model>
|
<model fallback='allow'>cortex-a53</model>
|
||||||
</cpu>
|
</cpu>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<pae/>
|
<pae/>
|
||||||
<gic version='2'/>
|
<gic version='2'/>
|
||||||
</features>
|
</features>
|
||||||
<cpu mode='custom' match='exact'>
|
<cpu mode='custom' match='exact' check='none'>
|
||||||
<model fallback='allow'>cortex-a53</model>
|
<model fallback='allow'>cortex-a53</model>
|
||||||
</cpu>
|
</cpu>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='host-passthrough' check='none'/>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
<controller type='usb' index='0'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<domain type='qemu'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='custom' match='exact' check='none'>
|
||||||
|
<model fallback='forbid'>core2duo</model>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu</emulator>
|
||||||
|
<controller type='usb' index='0'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='host-model' check='partial'>
|
||||||
|
<model fallback='allow'/>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
<controller type='usb' index='0'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='custom' match='exact' check='partial'>
|
||||||
|
<model fallback='forbid'>core2duo</model>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
<controller type='usb' index='0'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='custom' match='exact' check='full'>
|
||||||
|
<model fallback='forbid'>core2duo</model>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
<controller type='usb' index='0'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='custom' match='exact' check='none'>
|
||||||
|
<model fallback='forbid'>core2duo</model>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
<controller type='usb' index='0'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>6</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
|
<boot dev='network'/>
|
||||||
|
</os>
|
||||||
|
<cpu mode='custom' match='exact' check='partial'>
|
||||||
|
<model fallback='forbid'>core2duo</model>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
<controller type='usb' index='0'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
|
@ -13,7 +13,7 @@
|
||||||
<apic eoi='off'/>
|
<apic eoi='off'/>
|
||||||
<pae/>
|
<pae/>
|
||||||
</features>
|
</features>
|
||||||
<cpu mode='custom' match='exact'>
|
<cpu mode='custom' match='exact' check='none'>
|
||||||
<model fallback='allow'>qemu32</model>
|
<model fallback='allow'>qemu32</model>
|
||||||
</cpu>
|
</cpu>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<apic eoi='on'/>
|
<apic eoi='on'/>
|
||||||
<pae/>
|
<pae/>
|
||||||
</features>
|
</features>
|
||||||
<cpu mode='custom' match='exact'>
|
<cpu mode='custom' match='exact' check='none'>
|
||||||
<model fallback='allow'>qemu32</model>
|
<model fallback='allow'>qemu32</model>
|
||||||
</cpu>
|
</cpu>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<type arch='x86_64' machine='pc'>hvm</type>
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
<boot dev='network'/>
|
<boot dev='network'/>
|
||||||
</os>
|
</os>
|
||||||
<cpu mode='host-passthrough'/>
|
<cpu mode='host-passthrough' check='none'/>
|
||||||
<clock offset='utc'>
|
<clock offset='utc'>
|
||||||
<timer name='kvmclock' present='no'/>
|
<timer name='kvmclock' present='no'/>
|
||||||
</clock>
|
</clock>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<type arch='i686' machine='pc'>hvm</type>
|
<type arch='i686' machine='pc'>hvm</type>
|
||||||
<boot dev='hd'/>
|
<boot dev='hd'/>
|
||||||
</os>
|
</os>
|
||||||
<cpu mode='host-model'>
|
<cpu mode='host-model' check='partial'>
|
||||||
<model fallback='allow'/>
|
<model fallback='allow'/>
|
||||||
<feature policy='require' name='abm'/>
|
<feature policy='require' name='abm'/>
|
||||||
<feature policy='force' name='ds'/>
|
<feature policy='force' name='ds'/>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<type arch='i686' machine='pc'>hvm</type>
|
<type arch='i686' machine='pc'>hvm</type>
|
||||||
<boot dev='hd'/>
|
<boot dev='hd'/>
|
||||||
</os>
|
</os>
|
||||||
<cpu mode='host-passthrough'>
|
<cpu mode='host-passthrough' check='none'>
|
||||||
<feature policy='require' name='abm'/>
|
<feature policy='require' name='abm'/>
|
||||||
<feature policy='force' name='ds'/>
|
<feature policy='force' name='ds'/>
|
||||||
<feature policy='disable' name='invtsc'/>
|
<feature policy='disable' name='invtsc'/>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<type arch='i686' machine='pc'>hvm</type>
|
<type arch='i686' machine='pc'>hvm</type>
|
||||||
<boot dev='network'/>
|
<boot dev='network'/>
|
||||||
</os>
|
</os>
|
||||||
<cpu mode='custom' match='exact'>
|
<cpu mode='custom' match='exact' check='partial'>
|
||||||
<model fallback='allow'>core2duo</model>
|
<model fallback='allow'>core2duo</model>
|
||||||
</cpu>
|
</cpu>
|
||||||
<clock offset='utc'>
|
<clock offset='utc'>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<apic/>
|
<apic/>
|
||||||
<pae/>
|
<pae/>
|
||||||
</features>
|
</features>
|
||||||
<cpu mode='custom' match='exact'>
|
<cpu mode='custom' match='exact' check='partial'>
|
||||||
<model fallback='allow'>core2duo</model>
|
<model fallback='allow'>core2duo</model>
|
||||||
<vendor>Intel</vendor>
|
<vendor>Intel</vendor>
|
||||||
<topology sockets='1' cores='2' threads='1'/>
|
<topology sockets='1' cores='2' threads='1'/>
|
||||||
|
|
|
@ -1125,6 +1125,14 @@ mymain(void)
|
||||||
QEMU_CAPS_MACHINE_OPT,
|
QEMU_CAPS_MACHINE_OPT,
|
||||||
QEMU_CAPS_MACHINE_IOMMU);
|
QEMU_CAPS_MACHINE_IOMMU);
|
||||||
|
|
||||||
|
DO_TEST("cpu-check-none", NONE);
|
||||||
|
DO_TEST("cpu-check-partial", NONE);
|
||||||
|
DO_TEST("cpu-check-full", NONE);
|
||||||
|
DO_TEST("cpu-check-default-none", NONE);
|
||||||
|
DO_TEST("cpu-check-default-none2", NONE);
|
||||||
|
DO_TEST("cpu-check-default-partial", NONE);
|
||||||
|
DO_TEST("cpu-check-default-partial2", NONE);
|
||||||
|
|
||||||
qemuTestDriverFree(&driver);
|
qemuTestDriverFree(&driver);
|
||||||
|
|
||||||
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||||
|
|
Loading…
Reference in New Issue