提交 76fd7981 编写于 作者: J Ján Tomko

Validate required CPU features even for host-passthrough

Commit adff345e allowed enabling features with -cpu host
without ajdusting the validity checks on domain startup
and migration.
上级 57297465
...@@ -2322,7 +2322,7 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver, ...@@ -2322,7 +2322,7 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver,
if (!qemuMigrationIsAllowedHostdev(vm->def)) if (!qemuMigrationIsAllowedHostdev(vm->def))
return false; return false;
if (vm->def->cpu && vm->def->cpu->mode != VIR_CPU_MODE_HOST_PASSTHROUGH) { if (vm->def->cpu) {
for (i = 0; i < vm->def->cpu->nfeatures; i++) { for (i = 0; i < vm->def->cpu->nfeatures; i++) {
virCPUFeatureDefPtr feature = &vm->def->cpu->features[i]; virCPUFeatureDefPtr feature = &vm->def->cpu->features[i];
......
...@@ -3819,7 +3819,7 @@ qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver, ...@@ -3819,7 +3819,7 @@ qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver,
} }
} }
if (def->cpu && def->cpu->mode != VIR_CPU_MODE_HOST_PASSTHROUGH) { if (def->cpu) {
for (i = 0; i < def->cpu->nfeatures; i++) { for (i = 0; i < def->cpu->nfeatures; i++) {
virCPUFeatureDefPtr feature = &def->cpu->features[i]; virCPUFeatureDefPtr feature = &def->cpu->features[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册