lkml.org 
[lkml]   [2021]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC v2 28/32] x86/tdx: Make pages shared in ioremap()
From
Date
On 5/10/21 3:23 PM, Kuppuswamy, Sathyanarayanan wrote:
>>>>
>>>> -    if (!sev_active())
>>>> +    if (!sev_active() && !is_tdx_guest())
>>>>           return 0;
>>> I think it's time to come up with a real name for all of the code that's
>>> under: (sev_active() || is_tdx_guest()).
>>>
>>> "encrypted" isn't it, for sure.
>>
>> I called it protected_guest() in some other patches.
>
> If you are also fine with above mentioned function name, I can include it
> in this series. Since we have many use cases of above condition, it will
> be useful define it as helper function.

FWIW, I think sev_active() has a horrible name. Shouldn't that be
"is_sev_guest()"? "sev_active()" could be read as "I'm a SEV host" or
"I'm a SEV guest" and "SEV is active".

protected_guest() seems fine to cover both, despite the horrid SEV
naming. It'll actually be nice to banish it from appearing in many of
its uses. :)

\
 
 \ /
  Last update: 2021-05-11 00:32    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog