From nobody Mon Feb 9 09:41:21 2026 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 1496986469783910.8375857608985; Thu, 8 Jun 2017 22:34:29 -0700 (PDT) Received: from localhost ([::1]:52692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJCZ2-0002io-3H for importer@patchew.org; Fri, 09 Jun 2017 01:34:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJCRx-0003w0-5Q for qemu-devel@nongnu.org; Fri, 09 Jun 2017 01:27:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJCRv-0006da-Lk for qemu-devel@nongnu.org; Fri, 09 Jun 2017 01:27:09 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:34139) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dJCRv-0006cC-8v; Fri, 09 Jun 2017 01:27:07 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3wkW4b6wQhz9sN5; Fri, 9 Jun 2017 15:26:55 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1496986015; bh=pbBVm4E6h9vKto7BGzBFqMquE783fbaKizRXl/cSwNQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CU8SZ0L2nl1Z3a3XiJxUEOEt/HMyQWiQRr/K8dDW/F8VkyNtpxMI0FnpbUhEk5SZl Je57RrKZOhqwJYrF8RbAB90Meky41p1VuuKhTlGGSE2Zi2y1bG/wGxx3FdMhSW4T2k KkM5UWNY7I9i8zKIw1Vzz3qyeT8GJdXm2QlSZvlM= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 9 Jun 2017 15:26:36 +1000 Message-Id: <20170609052652.23200-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170609052652.23200-1-david@gibson.dropbear.id.au> References: <20170609052652.23200-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 04/20] 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: qemu-devel@nongnu.org, sursingh@redhat.com, mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@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