diff options
| author | Chao Gao <chao.gao@intel.com> | 2026-05-20 15:28:47 -0700 |
|---|---|---|
| committer | Dave Hansen <dave.hansen@linux.intel.com> | 2026-06-03 08:14:50 -0700 |
| commit | 9c0c68708dc48e8ae4f9043c96b387a0173361f1 (patch) | |
| tree | 47e154baa02fc04122dc1702fa1c01522fc6fe69 /scripts/Makefile.thinlto | |
| parent | 1ffa6a10253c417b281aff3cbd02bdf43b2b159d (diff) | |
x86/virt/tdx: Move TDX global initialization states to file scope
TDX module global initialization is executed only once. The first call
caches both the result and the "done" state, and later callers reuse the
saved result. A lock protects that cached states.
Those states and the lock are currently kept as function-local statics
because they are used only by try_init_module_global().
TDX module updates need to reset the cached states so TDX global
initialization can be run again after an update. That will add another
access site in the same file.
Move the cached states to file scope so it is accessible outside
try_init_module_global(), and move the lock along with the states it
protects.
No functional change intended.
Signed-off-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://patch.msgid.link/20260520133909.409394-3-chao.gao@intel.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
