Blame SOURCES/kvm-hw-intc-arm_gicv3_its-Fix-the-VM-termination-in-vm_c.patch

4a2fec
From 1bc2106857269cd428567fed2f8afedd25c2c288 Mon Sep 17 00:00:00 2001
4a2fec
From: Auger Eric <eric.auger@redhat.com>
4a2fec
Date: Tue, 28 Nov 2017 15:14:03 +0100
4a2fec
Subject: [PATCH 2/9] hw/intc/arm_gicv3_its: Fix the VM termination in
4a2fec
 vm_change_state_handler()
4a2fec
4a2fec
RH-Author: Auger Eric <eric.auger@redhat.com>
4a2fec
Message-id: <1511882048-11256-3-git-send-email-eric.auger@redhat.com>
4a2fec
Patchwork-id: 77937
4a2fec
O-Subject: [RHV7.5 qemu-kvm-ma PATCH 2/7] hw/intc/arm_gicv3_its: Fix the VM termination in vm_change_state_handler()
4a2fec
Bugzilla: 1513323
4a2fec
RH-Acked-by: Andrew Jones <drjones@redhat.com>
4a2fec
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
RH-Acked-by: Wei Huang <wei@redhat.com>
4a2fec
4a2fec
From: Shanker Donthineni <shankerd@codeaurora.org>
4a2fec
4a2fec
The commit cddafd8f353d ("hw/intc/arm_gicv3_its: Implement state save
4a2fec
/restore") breaks the backward compatibility with the older kernels
4a2fec
where vITS save/restore support is not available. The vmstate function
4a2fec
vm_change_state_handler() should not be registered if the running kernel
4a2fec
doesn't support ITS save/restore feature. Otherwise VM instance will be
4a2fec
killed whenever vmstate callback function is invoked.
4a2fec
4a2fec
Observed a virtual machine shutdown with QEMU-2.10+linux-4.11 when testing
4a2fec
the reboot command "virsh reboot <domain> --mode acpi" instead of reboot.
4a2fec
4a2fec
KVM Error: 'KVM_SET_DEVICE_ATTR failed: Group 4 attr 0x00000000000001'
4a2fec
4a2fec
Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
4a2fec
Reviewed-by: Eric Auger <eric.auger@redhat.com>
4a2fec
Message-id: 1509712671-16299-1-git-send-email-shankerd@codeaurora.org
4a2fec
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4a2fec
(cherry picked from commit 3a575cd2c2411f139a95ace4b2523bc1dfd21755)
4a2fec
Signed-off-by: Eric Auger <eric.auger@redhat.com>
4a2fec
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
---
4a2fec
 hw/intc/arm_gicv3_its_kvm.c | 4 ++--
4a2fec
 1 file changed, 2 insertions(+), 2 deletions(-)
4a2fec
4a2fec
diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
4a2fec
index 39903d5..9b00ce5 100644
4a2fec
--- a/hw/intc/arm_gicv3_its_kvm.c
4a2fec
+++ b/hw/intc/arm_gicv3_its_kvm.c
4a2fec
@@ -111,13 +111,13 @@ static void kvm_arm_its_realize(DeviceState *dev, Error **errp)
4a2fec
             error_free(s->migration_blocker);
4a2fec
             return;
4a2fec
         }
4a2fec
+    } else {
4a2fec
+        qemu_add_vm_change_state_handler(vm_change_state_handler, s);
4a2fec
     }
4a2fec
 
4a2fec
     kvm_msi_use_devid = true;
4a2fec
     kvm_gsi_direct_mapping = false;
4a2fec
     kvm_msi_via_irqfd_allowed = kvm_irqfds_enabled();
4a2fec
-
4a2fec
-    qemu_add_vm_change_state_handler(vm_change_state_handler, s);
4a2fec
 }
4a2fec
 
4a2fec
 /**
4a2fec
-- 
4a2fec
1.8.3.1
4a2fec