Re: [PATCH v6 6/6] arm64: Use SYSTEM_OFF2 PSCI call to power off for hibernate

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

 



On 24 October 2024 17:44:49 CEST, Oliver Upton <oliver.upton@xxxxxxxxx> wrote:
>Hi,
>
>On Thu, Oct 24, 2024 at 03:48:26PM +0200, David Woodhouse wrote:
>> On 24 October 2024 14:54:41 CEST, Miguel Luis <miguel.luis@xxxxxxxxxx> wrote:
>> >Perhaps spec. F.b. could be accommodated by first invoking SYSTEM_OFF2 with
>> >PSCI_1_3_OFF_TYPE_HIBERNATE_OFF and checking its return value in case of a
>> >fallback to an invocation with 0x0 ?
>
>This already complies with F.b.
>
>The PSCI implementation is required to accept either 0 or 1 for
>HIBERNATE_OFF. Using 0 seems like a good choice for compatibility since ...
>
>> I wasn't aware there was any point. Are there any hypervisors which actually implemented it that way? Amazon Linux and Ubuntu guests already just use zero.
>> 
>> We could add it later if such a hypervisor (now in violation of F.b) turns up, I suppose?
>
>IIUC, you're really wanting to 0x0 because there are hypervisors out
>there that violate the final spec and *only* accept this value.
>
>That's perfectly fine, but it'd help avoid confusion if the supporting
>comment was a bit more direct:
>
>	/*
>	 * If no hibernate type is specified SYSTEM_OFF2 defaults to
>	 * selecting HIBERNATE_OFF.
>	 *
>	 * There are hypervisors in the wild that violate the spec and
>	 * reject calls that explicitly provide a hibernate type. For
>	 * compatibility with these nonstandard implementations, pass 0
>	 * as the type.
>	 */
>	 if (system_entering_hibernation())
>		invoke_psci_fn(PSCI_FN_NATIVE(1_3, SYSTEM_OFF2), 0 , 0, 0);

By the time this makes it into released versions of the guest Linux kernel, that comment won't be true any more.






[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux