x86/virt/tdx: Handle SEAMCALL no entropy error in common code
authorKai Huang <kai.huang@intel.com>
Fri, 8 Dec 2023 17:07:24 +0000 (09:07 -0800)
committerDave Hansen <dave.hansen@linux.intel.com>
Fri, 8 Dec 2023 17:12:06 +0000 (09:12 -0800)
commit1e66a7e275393055d98d2306771fe1feadeb1cd6
tree74dfb5d514aaf673468ccd5828848992e4b413cc
parent3115cabd935ade76fbe61154d1e405158e548272
x86/virt/tdx: Handle SEAMCALL no entropy error in common code

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

There are three __seamcall*() variants.  Do the SEAMCALL retry in common
code and add a wrapper for each of them.

Signed-off-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Kirill A. Shutemov <kirll.shutemov@linux.intel.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20231208170740.53979-4-dave.hansen%40intel.com
arch/x86/include/asm/tdx.h