mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
qemu: Drop duplicated code from qemuDomainDefValidateFeatures()
Both VIR_DOMAIN_FEATURE_HPT and VIR_DOMAIN_FEATURE_HTM are handled in the exact same way, so we can remove some duplicated code without losing any functionality. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
167ba7d08d
commit
094c97ffad
@ -3889,6 +3889,7 @@ qemuDomainDefValidateFeatures(const virDomainDef *def,
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_FEATURE_HPT:
|
||||
case VIR_DOMAIN_FEATURE_HTM:
|
||||
if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT &&
|
||||
!qemuDomainIsPSeries(def)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
@ -3923,19 +3924,6 @@ qemuDomainDefValidateFeatures(const virDomainDef *def,
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_FEATURE_HTM:
|
||||
if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT &&
|
||||
!qemuDomainIsPSeries(def)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("The '%s' feature is not supported for "
|
||||
"architecture '%s' or machine type '%s'"),
|
||||
featureName,
|
||||
virArchToString(def->os.arch),
|
||||
def->os.machine);
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_FEATURE_ACPI:
|
||||
case VIR_DOMAIN_FEATURE_APIC:
|
||||
case VIR_DOMAIN_FEATURE_PAE:
|
||||
|
Loading…
Reference in New Issue
Block a user