lkml.org 
[lkml]   [2023]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v11 06/20] x86/virt/tdx: Handle SEAMCALL running out of entropy error
From
On 6/7/23 16:36, Huang, Kai wrote:
> On Wed, 2023-06-07 at 08:08 -0700, Hansen, Dave wrote:
>> On 6/4/23 07:27, Kai Huang wrote:
>>> Certain SEAMCALL leaf functions may return error due to running out of
>>> entropy, in which case the SEAMCALL should be retried as suggested by
>>> the TDX spec.
>>>
>>> Handle this case in SEAMCALL common function. Mimic the existing
>>> rdrand_long() to retry RDRAND_RETRY_LOOPS times.
>>
>> ... because who are we kidding? When the TDX module says it doesn't
>> have enough entropy it means rdrand.
>
> The TDX spec says "e.g., RDRAND or RDSEED".

Let's just say something a bit more useful and ambiguous:

Some SEAMCALLs use the RDRAND hardware and can fail for the
same reasons as RDRAND. Use the kernel RDRAND retry logic for
them.

We don't need to say "RDRAND and RDSEED", just saying "RDRAND hardware"
is fine. Everybody knows what you mean.

\
 
 \ /
  Last update: 2023-06-08 02:30    [W:0.233 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site