lkml.org 
[lkml]   [2022]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv4 05/30] x86/tdx: Extend the confidential computing API to support TDX guests
On 2/24/22 15:54, Kirill A. Shutemov wrote:
>
>> Second, why have the global 'td_info' instead of just declaring it on
>> the stack. It is only used within a single function. Having it on the
>> stack is *REALLY* nice because the code ends up looking like:
>>
>> struct foo foo;
>> get_info(&foo);
>> cc_set_bar(foo.bar);
>>
>> The dependencies and scope are just stupidly obvious if you do that.
> Okay, I will rework it with plain gpa_width on stack and get_info(&gpa_width);
> Attributes will be needed after core enabling, so I will drop it from
> here.

I don't mind the 'struct tdx_info' if there's going to be more stuff in
it soon-ish. Having a single member is fine for now. Just make it
clear that the seamcall returns a bunch of stuff and only a subset of it
is used right now.

\
 
 \ /
  Last update: 2022-02-25 01:56    [W:0.092 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site