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