From nobody Wed Nov 5 15:59:09 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496819331538432.4105899753009; Wed, 7 Jun 2017 00:08:51 -0700 (PDT) Received: from localhost ([::1]:41552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIV5F-0002GG-VI for importer@patchew.org; Wed, 07 Jun 2017 03:08:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIV4A-0001cE-Db for qemu-devel@nongnu.org; Wed, 07 Jun 2017 03:07:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIV47-0007Oe-8m for qemu-devel@nongnu.org; Wed, 07 Jun 2017 03:07:42 -0400 Received: from ozlabs.org ([103.22.144.67]:36647) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIV46-0007Nq-OC; Wed, 07 Jun 2017 03:07:39 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3wjKPh1W07z9sNh; Wed, 7 Jun 2017 17:07:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1496819256; bh=3bAMYWKpwHlLCRwF+NQkNbKv6J6V5O3sEUFFhu06Xic=; h=From:To:Cc:Subject:Date:From; b=doa/1hOMjgLNfhNDpWx1Vvh3E7OI2T64yqUVRD0F7mHoTQI23xloOQBY2T7n/gH0p rXU9b6rL1YdkuK0OVhzIltNfDkAR2sb4NOIyddg6qE902j51nb5YxOUJujUrHuknbQ TVL5yONlmAF9iikAF+Tz1wapblK1uCVr/S7xywbI= From: David Gibson To: mdroth@linux.vnet.ibm.com, thuth@redhat.com, lvivier@redhat.com Date: Wed, 7 Jun 2017 17:07:32 +1000 Message-Id: <20170607070732.23312-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PATCH] pseries: Correct panic behaviour for pseries machine type X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- 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 707c4d4..94a2799 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -293,12 +293,9 @@ static void rtas_ibm_os_term(PowerPCCPU *cpu, target_ulong args, uint32_t nret, target_ulong rets) { - target_ulong ret =3D 0; + qemu_system_guest_panicked(NULL); =20 - 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); } =20 static void rtas_set_power_level(PowerPCCPU *cpu, sPAPRMachineState *spapr, --=20 2.9.4