[lkml]   [2021]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC v2-fix-v2 1/1] x86: Introduce generic protected guest abstraction

On 6/2/21 11:15 AM, 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();

Yes. But for Intel, I think currently we can only check for is_tdx_guest() here.

if (is_tdx_guest())
return intel_protected_guest_has();

So if we use is_tdx_guest(), it is better to call tdx_protected_guest_has() here.

Once we start using protected_guest_has for other Intel technologies, may be
we can generalize it. Let me know your comments.

> 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.

Sathyanarayanan Kuppuswamy
Linux Kernel Developer

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