Blame SOURCES/kvm-pseries-Correct-panic-behaviour-for-pseries-machine-.patch

76daa3
From a905024791a3cece2edfe84e99944cd3b7226bae Mon Sep 17 00:00:00 2001
76daa3
From: David Gibson <dgibson@redhat.com>
76daa3
Date: Wed, 14 Jun 2017 02:59:50 +0200
76daa3
Subject: [PATCH 1/8] pseries: Correct panic behaviour for pseries machine type
76daa3
76daa3
RH-Author: David Gibson <dgibson@redhat.com>
76daa3
Message-id: <20170614025950.24275-1-dgibson@redhat.com>
76daa3
Patchwork-id: 75601
76daa3
O-Subject: [RHEL-7.4 qemu-kvm-rhev PATCH] pseries: Correct panic behaviour for pseries machine type
76daa3
Bugzilla: 1458705
76daa3
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
76daa3
RH-Acked-by: Thomas Huth <thuth@redhat.com>
76daa3
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
76daa3
76daa3
From: David Gibson <david@gibson.dropbear.id.au>
76daa3
76daa3
The pseries machine type doesn't usually use the 'pvpanic' device as such,
76daa3
because it has a firmware/hypervisor facility with roughly the same
76daa3
purpose.  The 'ibm,os-term' RTAS call notifies the hypervisor that the
76daa3
guest has crashed.
76daa3
76daa3
Our implementation of this call was sending a GUEST_PANICKED qmp event;
76daa3
however, it was not doing the other usual panic actions, making its
76daa3
behaviour different from pvpanic for no good reason.
76daa3
76daa3
To correct this, we should call qemu_system_guest_panicked() rather than
76daa3
directly sending the panic event.
76daa3
76daa3
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
76daa3
Reviewed-by: Thomas Huth <thuth@redhat.com>
76daa3
(cherry picked from commit 2c5534776b375bbaff3896420e41cb981d40e2bc)
76daa3
76daa3
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1458705
76daa3
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13420539
76daa3
76daa3
Signed-off-by: David Gibson <dgibson@redhat.com>
76daa3
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
76daa3
---
76daa3
 hw/ppc/spapr_rtas.c | 7 ++-----
76daa3
 1 file changed, 2 insertions(+), 5 deletions(-)
76daa3
76daa3
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
76daa3
index 128d993..fb56ca6 100644
76daa3
--- a/hw/ppc/spapr_rtas.c
76daa3
+++ b/hw/ppc/spapr_rtas.c
76daa3
@@ -332,12 +332,9 @@ static void rtas_ibm_os_term(PowerPCCPU *cpu,
76daa3
                             target_ulong args,
76daa3
                             uint32_t nret, target_ulong rets)
76daa3
 {
76daa3
-    target_ulong ret = 0;
76daa3
+    qemu_system_guest_panicked(NULL);
76daa3
 
76daa3
-    qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, false, NULL,
76daa3
-                                   &error_abort);
76daa3
-
76daa3
-    rtas_st(rets, 0, ret);
76daa3
+    rtas_st(rets, 0, RTAS_OUT_SUCCESS);
76daa3
 }
76daa3
 
76daa3
 static void rtas_set_power_level(PowerPCCPU *cpu, sPAPRMachineState *spapr,
76daa3
-- 
76daa3
1.8.3.1
76daa3