[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZR/fN5SDW5pFX1yR@ysun46-mobl.ccr.corp.intel.com>
Date: Fri, 6 Oct 2023 18:20:18 +0800
From: Yi Sun <yi.sun@...el.com>
To: Nikolay Borisov <nik.borisov@...e.com>
CC: <tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
<dave.hansen@...ux.intel.com>, <peterz@...radead.org>,
<x86@...nel.org>, <kirill.shutemov@...ux.intel.com>,
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
<kai.huang@...el.com>, <linux-kernel@...r.kernel.org>,
<heng.su@...el.com>, <yi.sun@...ux.intel.com>,
Dongcheng Yan <dongcheng.yan@...el.com>
Subject: Re: [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
Powered by blists - more mailing lists