]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/tdx: Introduce wrappers to read and write TD metadata
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Mon, 4 Nov 2024 10:38:00 +0000 (12:38 +0200)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 7 Nov 2024 18:26:16 +0000 (10:26 -0800)
commit5081e8fadb809253c911b349b01d87c5b4e3fec5
tree54bc7033989445711a42090cc52340269874dcd1
parent59b723cd2adbac2a34fc8e12c74ae26ae45bf230
x86/tdx: Introduce wrappers to read and write TD metadata

The TDG_VM_WR TDCALL is used to ask the TDX module to change some
TD-specific VM configuration. There is currently only one user in the
kernel of this TDCALL leaf.  More will be added shortly.

Refactor to make way for more users of TDG_VM_WR who will need to modify
other TD configuration values.

Add a wrapper for the TDG_VM_RD TDCALL that requests TD-specific
metadata from the TDX module. There are currently no users for
TDG_VM_RD. Mark it as __maybe_unused until the first user appears.

This is preparation for enumeration and enabling optional TD features.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://lore.kernel.org/all/20241104103803.195705-2-kirill.shutemov%40linux.intel.com
arch/x86/coco/tdx/tdx.c
arch/x86/include/asm/shared/tdx.h