lkml.org 
[lkml]   [2021]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH v4 08/13] x86/power/keylocker: Restore internal wrapping key from the ACPI S3/4 sleep states
Date
On Dec 17, 2021, at 07:42, Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> First, I would change the subject to "x86/PM/keylocker: Restore
> internal wrapping key on resume from ACPI S3/S4".
>
> On Tue, Dec 14, 2021 at 2:00 AM Chang S. Bae <chang.seok.bae@intel.com> wrote:
>>
>> When the system state switches to these sleep states, the internal
>> wrapping key gets reset in the CPU state.
>
> And here I would say
>
> "When the system enters the ACPI S3 or S4 sleep state, the internal
> wrapping key is discarded.”
>

<snip>

>> /**
>> * setup_keylocker - Enable the feature.
>> * @c: A pointer to struct cpuinfo_x86
>> @@ -49,6 +87,7 @@ void __ref setup_keylocker(struct cpuinfo_x86 *c)
>>
>> if (c == &boot_cpu_data) {
>> u32 eax, ebx, ecx, edx;
>> + bool backup_available;
>>
>> cpuid_count(KEYLOCKER_CPUID, 0, &eax, &ebx, &ecx, &edx);
>> /*
>> @@ -62,10 +101,49 @@ void __ref setup_keylocker(struct cpuinfo_x86 *c)
>> goto disable;
>> }
>>
>> + backup_available = (ebx & KEYLOCKER_CPUID_EBX_BACKUP) ? true : false;
>
> Why not
>
> backup_available = !!(ebx & KEYLOCKER_CPUID_EBX_BACKUP);
>
> Apart from this it looks OK, so with the above addressed, please feel
> free to add
>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> to this patch.

Thanks Rafael! Will do.

Chang
\
 
 \ /
  Last update: 2021-12-22 05:59    [W:0.067 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site