Home
last modified time | relevance | path

Searched hist:c30c4b25 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/arch/x86/coco/tdx/
H A Dtdcall.Sc30c4b25 Thu Jan 26 16:11:55 CST 2023 Kirill A. Shutemov <kirill.shutemov@linux.intel.com> x86/tdx: Refactor __tdx_hypercall() to allow pass down more arguments

RDI is the first argument to __tdx_hypercall() that used to pass pointer
to struct tdx_hypercall_args. RSI is the second argument that contains
flags, such as TDX_HCALL_HAS_OUTPUT and TDX_HCALL_ISSUE_STI.

RDI and RSI can also be used as arguments to TDVMCALL leafs. Move RDI to
RAX and RSI to RBP to free up them for the hypercall arguments.

RAX saved on stack during TDCALL as it returns status code in the
register.

RBP value has to be restored before returning from __tdx_hypercall() as
it is callee-saved register.

This is preparatory patch. No functional change.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20230126221159.8635-4-kirill.shutemov%40linux.intel.com