mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
qemu: process: Handle all failure values for dimms in qemuProcessHandleAcpiOstInfo
Hanlde all the possible failure codes as per ACPI standard documented in the function header. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1660410 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f2f14e3f45
commit
ab5d49d46c
@ -1403,14 +1403,20 @@ qemuProcessHandleAcpiOstInfo(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
"slotType='%s' slot='%s' source=%u status=%u",
|
||||
NULLSTR(alias), vm, vm->def->name, slotType, slot, source, status);
|
||||
|
||||
/* handle memory unplug failure */
|
||||
if (STREQ(slotType, "DIMM") && alias && status == 1) {
|
||||
if (!alias)
|
||||
goto cleanup;
|
||||
|
||||
if (STREQ(slotType, "DIMM")) {
|
||||
if ((source == 0x003 || source == 0x103) &&
|
||||
(status == 0x01 || (status >= 0x80 && status <= 0x83))) {
|
||||
qemuDomainSignalDeviceRemoval(vm, alias,
|
||||
QEMU_DOMAIN_UNPLUGGING_DEVICE_STATUS_GUEST_REJECTED);
|
||||
|
||||
event = virDomainEventDeviceRemovalFailedNewFromObj(vm, alias);
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
virObjectUnlock(vm);
|
||||
virObjectEventStateQueue(driver->domainEventState, event);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user