aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/boot/compressed/misc.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <[email protected]>2022-04-06 02:29:19 +0300
committerDave Hansen <[email protected]>2022-04-07 08:27:51 -0700
commitc141fa2c2bbaff0d1f2dc51160626dd22bc16ae2 (patch)
tree9942454b2bb18f162b96b1266008194785fc4c80 /arch/x86/boot/compressed/misc.c
parentae87f609cd52825fa7fa36f02b29e4357fd29eaa (diff)
x86/tdx: Handle CPUID via #VE
In TDX guests, most CPUID leaf/sub-leaf combinations are virtualized by the TDX module while some trigger #VE. Implement the #VE handling for EXIT_REASON_CPUID by handing it through the hypercall, which in turn lets the TDX module handle it by invoking the host VMM. More details on CPUID Virtualization can be found in the TDX module specification, the section titled "CPUID Virtualization". Note that VMM that handles the hypercall is not trusted. It can return data that may steer the guest kernel in wrong direct. Only allow VMM to control range reserved for hypervisor communication. Return all-zeros for any CPUID outside the hypervisor range. It matches CPU behaviour for non-supported leaf. Co-developed-by: Kuppuswamy Sathyanarayanan <[email protected]> Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Signed-off-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Reviewed-by: Andi Kleen <[email protected]> Reviewed-by: Tony Luck <[email protected]> Reviewed-by: Dave Hansen <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'arch/x86/boot/compressed/misc.c')
0 files changed, 0 insertions, 0 deletions