lkml.org 
[lkml]   [2024]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v18 015/121] KVM: TDX: Retry SEAMCALL on the lack of entropy error
On Tue, Jan 23, 2024 at 12:55 AM <isaku.yamahata@intel.com> wrote:
>
> From: Isaku Yamahata <isaku.yamahata@intel.com>
>
> Some SEAMCALL may return TDX_RND_NO_ENTROPY error when the entropy is
> lacking. Retry SEAMCALL on the error following rdrand_long() to retry
> RDRAND_RETRY_LOOPS times.
>
> Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>

This patch should not be needed anymore, just...

> + /* Mimic the existing rdrand_long() to retry RDRAND_RETRY_LOOPS times. */
> + retry = RDRAND_RETRY_LOOPS;
> + do {
> + /* As __seamcall_ret() overwrites out, init out on each loop. */
> *out = *in;
> ret = __seamcall_ret(op, out);
> - } else
> - ret = __seamcall(op, in);

.. use seamcall() and seamcall_ret() here instead of the "__" versions.

Paolo


\
 
 \ /
  Last update: 2024-05-27 14:57    [W:0.061 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site