Received: from eggs.gnu.org ([2001:4830:134:3::10]:42969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1Tmr-0006K8-48 for qemu-devel@nongnu.org; Mon, 30 Jun 2014 01:06:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1Tmj-0001sP-Dr for qemu-devel@nongnu.org; Mon, 30 Jun 2014 01:05:53 -0400 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:33789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1Tmi-0001rR-Nl for qemu-devel@nongnu.org; Mon, 30 Jun 2014 01:05:45 -0400 Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Jun 2014 15:05:35 +1000 From: Nikunj A Dadhania In-Reply-To: <53ADC607.4050608@gmail.com> References: <1403854675-28778-1-git-send-email-nikunj@linux.vnet.ibm.com> <53ADC607.4050608@gmail.com> Date: Mon, 30 Jun 2014 10:35:21 +0530 Message-ID: <87tx73vvfy.fsf@abhimanyu.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v4] ppc: spapr-rtas - implement os-term rtas call List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tyrel Datwyler , qemu-devel@nongnu.org, agraf@suse.de Cc: Benjamin Herrenschmidt , qemu-ppc@nongnu.org Tyrel Datwyler writes: > On 06/27/2014 12:37 AM, Nikunj A Dadhania wrote: >> 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 >> v4: update spapr_register_rtas and qapi_event changes >> --- >> hw/ppc/spapr_rtas.c | 36 ++++++++++++++++++++++++++++++++++++ >> 1 file changed, 36 insertions(+) >> >> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c >> index 9ba1ba6..b11de41 100644 >> --- a/hw/ppc/spapr_rtas.c >> +++ b/hw/ppc/spapr_rtas.c >> @@ -277,6 +277,38 @@ 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; >> + >> + qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, &error_abort); >> + >> + rtas_st(rets, 0, ret); >> +} >> + >> +/* >> + * According to PAPR, rtas ibm,os-term, does not gaurantee a return >> + * back to the guest cpu. >> + * >> + * While an additional ibm,extended-os-term property indicates that >> + * rtas call return will always occur. Below function implements a >> + * place holder for the same. >> + */ > > PAPR defines ibm,extended-os-term as a null encoded property not a rtas > function. It should be added to the device tree in the > spapr_create_fdt_skel function under the "rtas" node. The following > should suffice. > > _FDT((fdt_property(fdt, "ibm,extended-os-term", NULL, 0))); > Sure, I can do that, much better. Regards Nikunj