From: Laine Stump Date: Thu, 9 Sep 2021 17:02:56 +0000 (-0400) Subject: conf: log error on attempts to modify ACPI index of active device X-Git-Tag: v7.8.0-rc1~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddba9f1dc945383428a312fbd7a6d370d16f2865;p=thirdparty%2Flibvirt.git conf: log error on attempts to modify ACPI index of active device The ACPI index of a device in a running guest can't be modified, and libvirt doesn't actually attempt to modify it, but it was possible for a user to request such a modification, and libvirt wouldn't complain, thus misleading the user into thinking that it had actually been changed. Resolves: https://bugzilla.redhat.com/1998920 Signed-off-by: Laine Stump Reviewed-by: Michal Privoznik --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 73f8aade96..6c32609431 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -28485,6 +28485,12 @@ virDomainDefCompatibleDevice(virDomainDef *def, _("changing device alias is not allowed")); return -1; } + + if (data.newInfo->acpiIndex != data.oldInfo->acpiIndex) { + virReportError(VIR_ERR_OPERATION_DENIED, "%s", + _("changing device 'acpi index' is not allowed")); + return -1; + } } if (!virDomainDefHasUSB(def) &&