summaryrefslogtreecommitdiffstats
path: root/arch/x86/coco/tdx
diff options
context:
space:
mode:
authorNikolay Borisov <nik.borisov@suse.com>2023-05-05 15:03:32 +0300
committerDave Hansen <dave.hansen@linux.intel.com>2023-05-23 07:01:45 -0700
commit122333d6bd229af279cdb35d1b874b71b3b9ccfb (patch)
treef4063006f36a62e8856ddcd85886491947d87ae9 /arch/x86/coco/tdx
parent44c026a73be8038f03dbdeef028b642880cf1511 (diff)
downloadlinux-stable-122333d6bd229af279cdb35d1b874b71b3b9ccfb.tar.gz
linux-stable-122333d6bd229af279cdb35d1b874b71b3b9ccfb.tar.bz2
linux-stable-122333d6bd229af279cdb35d1b874b71b3b9ccfb.zip
x86/tdx: Wrap exit reason with hcall_func()
TDX reuses VMEXIT "reasons" in its guest->host hypercall ABI. This is confusing because there might not be a VMEXIT involved at *all*. These instances are supposed to document situation and reduce confusion by wrapping VMEXIT reasons with hcall_func(). The decompression code does not follow this convention. Unify the TDX decompression code with the other TDX use of VMEXIT reasons. No functional changes. Signed-off-by: Nikolay Borisov <nik.borisov@suse.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Link: https://lore.kernel.org/all/20230505120332.1429957-1-nik.borisov%40suse.com
Diffstat (limited to 'arch/x86/coco/tdx')
-rw-r--r--arch/x86/coco/tdx/tdx.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/arch/x86/coco/tdx/tdx.c b/arch/x86/coco/tdx/tdx.c
index e146b599260f..15569bd32ed5 100644
--- a/arch/x86/coco/tdx/tdx.c
+++ b/arch/x86/coco/tdx/tdx.c
@@ -76,17 +76,6 @@ noinstr void __tdx_hypercall_failed(void)
panic("TDVMCALL failed. TDX module bug?");
}
-/*
- * The TDG.VP.VMCALL-Instruction-execution sub-functions are defined
- * independently from but are currently matched 1:1 with VMX EXIT_REASONs.
- * Reusing the KVM EXIT_REASON macros makes it easier to connect the host and
- * guest sides of these calls.
- */
-static __always_inline u64 hcall_func(u64 exit_reason)
-{
- return exit_reason;
-}
-
#ifdef CONFIG_KVM_GUEST
long tdx_kvm_hypercall(unsigned int nr, unsigned long p1, unsigned long p2,
unsigned long p3, unsigned long p4)