lkml.org 
[lkml]   [2017]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH] arm64: xen: Implement EFI reset_system callback
    On Thu, Apr 06, 2017 at 04:38:24PM +0200, Juergen Gross wrote:
    > On 06/04/17 16:27, Daniel Kiper wrote:
    > > On Thu, Apr 06, 2017 at 09:32:32AM +0100, Julien Grall wrote:
    > >> Hi Juergen,
    > >>
    > >> On 06/04/17 07:23, Juergen Gross wrote:
    > >>> On 05/04/17 21:49, Boris Ostrovsky wrote:
    > >>>> On 04/05/2017 02:14 PM, Julien Grall wrote:
    > >>>>> The x86 code has theoritically a similar issue, altought EFI does not
    > >>>>> seem to be the preferred method. I have left it unimplemented on x86 and
    > >>>>> CCed Linux Xen x86 maintainers to know their view here.
    > >>>>
    > >>>> (+Daniel)
    > >>>>
    > >>>> This could be a problem for x86 as well, at least theoretically.
    > >>>> xen_machine_power_off() may call pm_power_off(), which is efi.reset_system.
    > >>>>
    > >>>> So I think we should have a similar routine there.
    > >>>
    > >>> +1
    > >>>
    > >>> I don't see any problem with such a routine added, in contrast to
    > >>> potential "reboots" instead of power off without it.
    > >>>
    > >>> So I think this dummy xen_efi_reset_system() should be added to
    > >>> drivers/xen/efi.c instead.
    > >>
    > >> I will resend the patch during day with xen_efi_reset_system moved
    > >> to common code and implement the x86 counterpart (thought, I will
    > >> not be able to test it).
    > >
    > > I think that this is ARM specific issue. On x86 machine_restart() calls
    > > xen_restart(). Hence, everything works. So, I think that it should be
    > > fixed only for ARM. Anyway, please CC me when you send a patch.
    >
    > What about xen_machine_power_off() (as stated in Boris' mail)?

    Guys what do you think about that:

    --- a/drivers/firmware/efi/reboot.c
    +++ b/drivers/firmware/efi/reboot.c
    @@ -55,7 +55,7 @@ static void efi_power_off(void)

    static int __init efi_shutdown_init(void)
    {
    - if (!efi_enabled(EFI_RUNTIME_SERVICES))
    + if (!efi_enabled(EFI_RUNTIME_SERVICES) || efi_enabled(EFI_PARAVIRT))
    return -ENODEV;

    if (efi_poweroff_required())

    Julien, for ARM64 please take a look at arch/arm64/kernel/efi.c:efi_poweroff_required(void).

    I hope that tweaks for both files should solve our problem.

    Daniel

    \
     
     \ /
      Last update: 2017-04-06 17:22    [W:2.235 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site