qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] ppc: spapr-rtas - implement os-term rtas cal


From: Nikunj A Dadhania
Subject: Re: [Qemu-devel] [PATCH v2] ppc: spapr-rtas - implement os-term rtas call
Date: Tue, 17 Jun 2014 15:49:26 +0530
User-agent: Notmuch/0.17+27~gae47d61 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-redhat-linux-gnu)

Alexander Graf <address@hidden> writes:

> On 17.06.14 11:59, Nikunj A Dadhania wrote:
>> Alexander Graf <address@hidden> writes:
>>> On 17.06.14 11:30, Nikunj A Dadhania wrote:
>>>> Alexander Graf <address@hidden> writes:

>>>>>> +    spapr_rtas_register("ibm,os-term", rtas_ibm_os_term);
>>>>>> +    spapr_rtas_register("ibm,extended-os-term", rtas_ibm_ext_os_term);
>>>>> Why do we need the extended-os-term if we don't do anything with it?
>>>> Linux kernel checks for both of them because of legacy:
>>>>
>>>> arch/powerpc/kernel/rtas.c:
>>>>
>>>> void rtas_os_term(char *str)
>>>> {
>>>> [...]
>>>>           /*
>>>>            * Firmware with the ibm,extended-os-term property is guaranteed
>>>>            * to always return from an ibm,os-term call. Earlier versions 
>>>> without
>>>>            * this property may terminate the partition which we want to 
>>>> avoid
>>>>            * since it interferes with panic_timeout.
>>> But we do not return from the RTAS call, so we don't adhere to the
>>> extended semantics?
>> But you would return without calling os-term call if
>> ibm,extended-os-term isnt registered. For that reason I h       ave defined a
>> stub.
>
> I appreciate the hacker mentality, but Linux explicitly checks on 
> ibm,extended-os-term to ensure that the hypervisor does not stop the VM 
> when it calls ibm,os-term. However, the implementation above does stop 
> the VM when the guest calls ibm,os-term.

Seems to be added to do just that:

commit e9bbc8cde0e3c33b42ddbe1b02108cb5c97275eb
Author: Anton Blanchard <address@hidden>
Date:   Thu Feb 18 12:11:51 2010 +0000

    powerpc/pseries: Call ibm,os-term if the ibm,extended-os-term is present
    
    We have had issues in the past with ibm,os-term initiating shutdown of a
    partition. This is confusing to the user, especially if panic_timeout is
    non zero.
    
    The temporary fix was to avoid calling ibm,os-term if a panic_timeout was 
set
    and since we set it on every boot we basically never call ibm,os-term.
    
    An extended version of ibm,os-term has since been implemented which gives us
    the behaviour we want:
    
      "When the platform supports extended ibm,os-term behavior, the return to 
the
      RTAS will always occur unless there is a kernel assisted dump active as
      initiated by an ibm,configure-kernel-dump call."
    
    This patch checks for the ibm,extended-os-term property and calls 
ibm,os-term
    if it exists.
    
    Signed-off-by: Anton Blanchard <address@hidden>
    Signed-off-by: Benjamin Herrenschmidt <address@hidden>

> Why was that check put into place?


Regards
Nikunj




reply via email to

[Prev in Thread] Current Thread [Next in Thread]