]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/tdx: Prepare for using "INFO" call for a second purpose
authorDave Hansen <dave.hansen@linux.intel.com>
Fri, 28 Oct 2022 14:12:19 +0000 (17:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 17:17:36 +0000 (18:17 +0100)
commitbc2f9bf9b51f6637dfadc9dfe4fc1febacae9d71
tree7ca05e5693d3b94060e927269fbdef892ac2f20c
parent2f8d9b94176d48d733a461e13bb4f6589653ba05
x86/tdx: Prepare for using "INFO" call for a second purpose

commit a6dd6f39008bb3ef7c73ef0a2acc2a4209555bd8 upstream.

The TDG.VP.INFO TDCALL provides the guest with various details about
the TDX system that the guest needs to run.  Only one field is currently
used: 'gpa_width' which tells the guest which PTE bits mark pages shared
or private.

A second field is now needed: the guest "TD attributes" to tell if
virtualization exceptions are configured in a way that can harm the guest.

Make the naming and calling convention more generic and discrete from the
mask-centric one.

Thanks to Sathya for the inspiration here, but there's no code, comments
or changelogs left from where he started.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/coco/tdx/tdx.c