Commit 0da908c2 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Dave Hansen
Browse files

x86/tdx: Add more registers to struct tdx_hypercall_args



struct tdx_hypercall_args is used to pass down hypercall arguments to
__tdx_hypercall() assembly routine.

Currently __tdx_hypercall() handles up to 6 arguments. In preparation to
changes in __tdx_hypercall(), expand the structure to 6 more registers
and generate asm offsets for them.

Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20230126221159.8635-3-kirill.shutemov%40linux.intel.com
parent 3543f883
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -22,12 +22,18 @@
 * This is a software only structure and not part of the TDX module/VMM ABI.
 */
struct tdx_hypercall_args {
	u64 r8;
	u64 r9;
	u64 r10;
	u64 r11;
	u64 r12;
	u64 r13;
	u64 r14;
	u64 r15;
	u64 rdi;
	u64 rsi;
	u64 rbx;
	u64 rdx;
};

/* Used to request services from the VMM */
+6 −0
Original line number Diff line number Diff line
@@ -75,12 +75,18 @@ static void __used common(void)
	OFFSET(TDX_MODULE_r11, tdx_module_output, r11);

	BLANK();
	OFFSET(TDX_HYPERCALL_r8,  tdx_hypercall_args, r8);
	OFFSET(TDX_HYPERCALL_r9,  tdx_hypercall_args, r9);
	OFFSET(TDX_HYPERCALL_r10, tdx_hypercall_args, r10);
	OFFSET(TDX_HYPERCALL_r11, tdx_hypercall_args, r11);
	OFFSET(TDX_HYPERCALL_r12, tdx_hypercall_args, r12);
	OFFSET(TDX_HYPERCALL_r13, tdx_hypercall_args, r13);
	OFFSET(TDX_HYPERCALL_r14, tdx_hypercall_args, r14);
	OFFSET(TDX_HYPERCALL_r15, tdx_hypercall_args, r15);
	OFFSET(TDX_HYPERCALL_rdi, tdx_hypercall_args, rdi);
	OFFSET(TDX_HYPERCALL_rsi, tdx_hypercall_args, rsi);
	OFFSET(TDX_HYPERCALL_rbx, tdx_hypercall_args, rbx);
	OFFSET(TDX_HYPERCALL_rdx, tdx_hypercall_args, rdx);

	BLANK();
	OFFSET(BP_scratch, boot_params, scratch);