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:
Peter Krempa 2019-01-22 12:14:39 +01:00
parent f2f14e3f45
commit ab5d49d46c

View File

@ -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) {
qemuDomainSignalDeviceRemoval(vm, alias,
QEMU_DOMAIN_UNPLUGGING_DEVICE_STATUS_GUEST_REJECTED);
if (!alias)
goto cleanup;
event = virDomainEventDeviceRemovalFailedNewFromObj(vm, alias);
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);