summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/tdx.h
diff options
context:
space:
mode:
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>2022-11-16 14:38:18 -0800
committerDave Hansen <dave.hansen@linux.intel.com>2022-11-17 11:03:09 -0800
commit51acfe89af1118f906f9b68d95fdfb22832ac960 (patch)
tree39437838ab7a5009eb8c730df7c6d60175eaed22 /arch/x86/include/asm/tdx.h
parent094226ad94f471a9f19e8f8e7140a09c2625abaa (diff)
downloadlinux-stable-51acfe89af1118f906f9b68d95fdfb22832ac960.tar.gz
linux-stable-51acfe89af1118f906f9b68d95fdfb22832ac960.tar.bz2
linux-stable-51acfe89af1118f906f9b68d95fdfb22832ac960.zip
x86/tdx: Add a wrapper to get TDREPORT0 from the TDX Module
To support TDX attestation, the TDX guest driver exposes an IOCTL interface to allow userspace to get the TDREPORT0 (a.k.a. TDREPORT subtype 0) from the TDX module via TDG.MR.TDREPORT TDCALL. In order to get the TDREPORT0 in the TDX guest driver, instead of using a low level function like __tdx_module_call(), add a tdx_mcall_get_report0() wrapper function to handle it. This is a preparatory patch for adding attestation support. Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Acked-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/all/20221116223820.819090-2-sathyanarayanan.kuppuswamy%40linux.intel.com
Diffstat (limited to 'arch/x86/include/asm/tdx.h')
-rw-r--r--arch/x86/include/asm/tdx.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h
index 020c81a7c729..28d889c9aa16 100644
--- a/arch/x86/include/asm/tdx.h
+++ b/arch/x86/include/asm/tdx.h
@@ -67,6 +67,8 @@ void tdx_safe_halt(void);
bool tdx_early_handle_ve(struct pt_regs *regs);
+int tdx_mcall_get_report0(u8 *reportdata, u8 *tdreport);
+
#else
static inline void tdx_early_init(void) { };