From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0QRY-0008T9-IX for qemu-devel@nongnu.org; Fri, 27 Jun 2014 03:19:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0QRR-0003Z5-IZ for qemu-devel@nongnu.org; Fri, 27 Jun 2014 03:19:32 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:55831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0QRQ-0003YO-Ok for qemu-devel@nongnu.org; Fri, 27 Jun 2014 03:19:25 -0400 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jun 2014 12:49:21 +0530 From: Nikunj A Dadhania In-Reply-To: <1403851658-13128-1-git-send-email-nikunj@linux.vnet.ibm.com> References: <1403851658-13128-1-git-send-email-nikunj@linux.vnet.ibm.com> Date: Fri, 27 Jun 2014 12:48:43 +0530 Message-ID: <87a98yn7l8.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 1/3 v3] ppc: spapr-rtas - implement os-term rtas call List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, agraf@suse.de Cc: aik@au1.ibm.com, Benjamin Herrenschmidt , qemu-ppc@nongnu.org, Anton Blanchard Nikunj A Dadhania writes: > PAPR compliant guest calls this in absence of kdump. This finally > reaches the guest and can be handled according to the policies set by > higher level tools(like taking dump) for further analysis by tools like > crash. > > Linux kernel calls this only when the extended version of os,term is > implemented to make sure that a return to the linux kernel is gauranteed. > > CC: Benjamin Herrenschmidt > CC: Anton Blanchard > CC: Alexander Graf > Signed-off-by: Nikunj A Dadhania > > --- > > v2: rebase to ppcnext > v3: Do not stop the VM, and update comments > --- > hw/ppc/spapr_rtas.c | 41 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 41 insertions(+) > > diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c > index 9ba1ba6..2da33c8 100644 > --- a/hw/ppc/spapr_rtas.c > +++ b/hw/ppc/spapr_rtas.c > @@ -29,6 +29,8 @@ > #include "sysemu/char.h" > #include "hw/qdev.h" > #include "sysemu/device_tree.h" > +#include "qapi/qmp/qjson.h" > +#include "monitor/monitor.h" > > #include "hw/ppc/spapr.h" > #include "hw/ppc/spapr_vio.h" > @@ -277,6 +279,41 @@ static void rtas_ibm_set_system_parameter(PowerPCCPU *cpu, > rtas_st(rets, 0, ret); > } > > +static void rtas_ibm_os_term(PowerPCCPU *cpu, > + sPAPREnvironment *spapr, > + uint32_t token, uint32_t nargs, > + target_ulong args, > + uint32_t nret, target_ulong rets) > +{ > + target_ulong ret = 0; > + QObject *data; > + > + data = qobject_from_jsonf("{ 'action': %s }", "pause"); > + monitor_protocol_event(QEVENT_GUEST_PANICKED, data); > + qobject_decref(data); Even the above has got changed, and newer api: qapi_event_send_guest_panicked Regards Nikunj