lkml.org 
[lkml]   [2023]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] x86/tdx: Dump TDX version During the TD Bootup
On 06.10.2023 11:11, Nikolay Borisov wrote:
>
>
>On 6.10.23 г. 9:28 ч., Yi Sun wrote:
>>+static void tdg_get_sysinfo(struct tdg_sys_info *td_sys)
>>+{
>>+ u64 ret;
>>+ struct tdx_module_args args = {
>>+ .rdx = TDX_SYS_VENDOR_ID_FID,
>>+ };
>>+
>>+ if (!td_sys)
>>+ return;
>>+
>>+ memset(td_sys, 0, sizeof(struct tdg_sys_info));
>
>So in case of an error this function would effectively zero out
>tdg_sys_info and not explicitly mention that something went wrong.
>Dunno how sensible or likely it is to get an error while requesting
>the ID_FID ? Also why don't you check for errors on subsequent calls
>to TDG.SYS.RD ?
>
I'll add some error info before each error return to know what going
on when some error occurs.

Actually, I removed the error check for subsequent calls to TDG.SYS.RD
in this version, since it's probably not necessary when the first call
is successful. I can add them back with warning dumping when errors occurs.

Thanks
--Sun, Yi

\
 
 \ /
  Last update: 2023-10-06 15:48    [W:2.095 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site