qemu: Validate guest CPU features before starting a domain

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark 2017-09-14 16:07:59 +02:00
parent 6ef9c202f2
commit 3f0193f7e5

View File

@ -4659,6 +4659,10 @@ qemuProcessStartValidate(virQEMUDriverPtr driver,
if (qemuProcessStartValidateShmem(vm) < 0) if (qemuProcessStartValidateShmem(vm) < 0)
return -1; return -1;
if (vm->def->cpu &&
virCPUValidateFeatures(vm->def->os.arch, vm->def->cpu) < 0)
return -1;
VIR_DEBUG("Checking for any possible (non-fatal) issues"); VIR_DEBUG("Checking for any possible (non-fatal) issues");
qemuProcessStartWarnShmem(vm); qemuProcessStartWarnShmem(vm);