lkml.org 
[lkml]   [2021]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2-fix-v2 1/1] x86: Introduce generic protected guest abstraction
On Wed, Jun 02, 2021 at 01:15:23PM -0500, Tom Lendacky wrote:
> The original suggestion from Boris, IIRC, was for protected_guest_has()
> function (below) to be:
>
> if (intel)
> return intel_protected_guest_has();
> else if (amd)
> return amd_protected_guest_has();
> else
> return false;
>
> And then you could check for TDX or SME/SEV in the respective functions.

Yeah, a single function call which calls vendor-specific functions.

If you can point me to a tree with your patches, I can try to hack up
what I mean.

> I believe Boris was wanting to replace the areas where sme_active() was
> specifically checked, too. And so protected_guest_has() can be confusing...

We can always say

protected_guest_has(SME_ACTIVE);

or so and then it is clear.

> Maybe naming it protected_os_has() or protection_attr_active() might work.
> This would then work SME or MKTME as well.

But other names are fine too once we're done with the bikeshedding.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2021-06-02 20:30    [W:0.135 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site