[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v5] ppc: spapr-rtas - implement os-term rtas call
From: |
Alexander Graf |
Subject: |
Re: [Qemu-ppc] [PATCH v5] ppc: spapr-rtas - implement os-term rtas call |
Date: |
Mon, 30 Jun 2014 11:11:54 +0200 |
> Am 30.06.2014 um 10:35 schrieb Nikunj A Dadhania <address@hidden>:
>
> 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 ibm,os-term when extended property of os-term is set.
> This makes sure that a return to the linux kernel is gauranteed.
>
> CC: Benjamin Herrenschmidt <address@hidden>
> CC: Anton Blanchard <address@hidden>
> CC: Alexander Graf <address@hidden>
> CC: Tyrel Datwyler <address@hidden>
> Signed-off-by: Nikunj A Dadhania <address@hidden>
>
> ---
>
> v2: rebase to ppcnext
> v3: Do not stop the VM, and update comments
> v4: update spapr_register_rtas and qapi_event changes
> v5: set ibm,extended-os-term as null encoded property
> ---
> hw/ppc/spapr.c | 9 +++++++++
> hw/ppc/spapr_rtas.c | 15 +++++++++++++++
> include/hw/ppc/spapr.h | 1 -
> 3 files changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 307c58d..e6c9014 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -520,6 +520,15 @@ static void *spapr_create_fdt_skel(hwaddr initrd_base,
>
> _FDT((fdt_property_cell(fdt, "rtas-error-log-max", RTAS_ERROR_LOG_MAX)));
>
> + /*
> + * 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. Set this property.
> + */
> + _FDT((fdt_property(fdt, "ibm,extended-os-term", NULL, 0)));
> +
> _FDT((fdt_end_node(fdt)));
>
> /* interrupt controller */
> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
> index 9ba1ba6..2ec2a8e 100644
> --- a/hw/ppc/spapr_rtas.c
> +++ b/hw/ppc/spapr_rtas.c
> @@ -277,6 +277,19 @@ 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);
The guest doesn't pause. Since the guest will call os-term in a loop, this will
also flood the event listener with lots and lots of panic messages.
Alex