mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Fix error code for SEV launchSecurity unsupported
When SEV is not supported but specified in the domain XML by a user it should not result in an internal error (VIR_ERR_INTERNAL_ERROR) therefore switching to XML error (VIR_ERR_CONFIG_UNSUPPORTED). Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
d6ca1ac981
commit
c4caa1e736
@ -1218,7 +1218,7 @@ qemuValidateDomainDef(const virDomainDef *def,
|
|||||||
switch ((virDomainLaunchSecurity) def->sec->sectype) {
|
switch ((virDomainLaunchSecurity) def->sec->sectype) {
|
||||||
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
|
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
|
||||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SEV_GUEST)) {
|
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SEV_GUEST)) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("SEV launch security is not supported with "
|
_("SEV launch security is not supported with "
|
||||||
"this QEMU binary"));
|
"this QEMU binary"));
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user