From: Michal Privoznik Date: Mon, 25 Feb 2019 10:30:37 +0000 (+0100) Subject: qemuDomainDefValidate: Don't require SMM if automatic firmware selection enabled X-Git-Tag: v5.2.0-rc1~231 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d433f3cdd8abe21fc47311c1a4cb96348508be62;p=thirdparty%2Flibvirt.git qemuDomainDefValidate: Don't require SMM if automatic firmware selection enabled The firmware selection code will enable the feature if needed. There's no need to require SMM to be enabled in that case. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrangé Reviewed-by: Laszlo Ersek --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 6326b69401..ec82ee2291 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4175,7 +4175,9 @@ qemuDomainDefValidate(const virDomainDef *def, goto cleanup; } - if (def->features[VIR_DOMAIN_FEATURE_SMM] != VIR_TRISTATE_SWITCH_ON) { + /* SMM will be enabled by qemuFirmwareFillDomain() if needed. */ + if (def->os.firmware == VIR_DOMAIN_OS_DEF_FIRMWARE_NONE && + def->features[VIR_DOMAIN_FEATURE_SMM] != VIR_TRISTATE_SWITCH_ON) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Secure boot requires SMM feature enabled")); goto cleanup;