lkml.org 
[lkml]   [2023]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v11 02/20] x86/virt/tdx: Detect TDX during kernel boot
Date
[...]

> > + /*
> > + * Just use the first TDX KeyID as the 'global KeyID' and
> > + * leave the rest for TDX guests.
> > + */
> > + tdx_global_keyid = tdx_keyid_start;
> > + tdx_guest_keyid_start = ++tdx_keyid_start;
> > + tdx_nr_guest_keyids = --nr_tdx_keyids;
>
> tdx_guest_keyid_start = tdx_keyid_start + 1;
> tdx_nr_guest_keyids = nr_tdx_keyids - 1;
>
> Easier to get, because the modified values are unused.

Will do.

>
> I'd probably avoid the "tdx" terminology in the local variables
> ("keid_start", "nr_keyids") to give a better hint what the global
> variables are (tdx_*), but just a personal preference.
>

Yeah in general I agree but I chose to have "tdx_*" because it allows me to
easily distinguish function local variables and static variables, especially
this file contains more than ~1500 LoC (it also makes life easier to name the
local variables). So I'd like to keep the "tdx_*".

>
> Apart from that,
>
> Reviewed-by: David Hildenbrand <david@redhat.com>
>

Thanks!
\
 
 \ /
  Last update: 2023-06-20 01:59    [W:0.254 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site