diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 890f07ed6c..4ecab67ce0 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -41,8 +41,10 @@ qemuValidateDomainDefPSeriesFeature(const virDomainDef *def, { const char *str; - if (def->features[feature] != VIR_TRISTATE_SWITCH_ABSENT && - !qemuDomainIsPSeries(def)) { + if (def->features[feature] == VIR_TRISTATE_SWITCH_ABSENT) + return 0; + + if (!qemuDomainIsPSeries(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("The '%1$s' feature is not supported for architecture '%2$s' or machine type '%3$s'"), virDomainFeatureTypeToString(feature), @@ -51,9 +53,6 @@ qemuValidateDomainDefPSeriesFeature(const virDomainDef *def, return -1; } - if (def->features[feature] == VIR_TRISTATE_SWITCH_ABSENT) - return 0; - switch (feature) { case VIR_DOMAIN_FEATURE_HPT: if (def->features[feature] != VIR_TRISTATE_SWITCH_ON)