summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/tdx
Commit message (Collapse)AuthorAgeFilesLines
* selftests/tdx: add gitignore fileJavier Carrasco2023-10-051-0/+1
| | | | | | | tdx builds a tdx_guest_test binary that can be ignored by git. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
* selftests: tdx: Use installed kernel headers search pathMathieu Desnoyers2023-02-132-2/+2
| | | | | | | | | | | | Use $(KHDR_INCLUDES) as lookup path for installed kernel headers rather than using kernel headers in include/uapi from the source kernel tree kernel headers. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Shuah Khan <shuah@kernel.org> Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
* selftests/tdx: Test TDX attestation GetReport supportKuppuswamy Sathyanarayanan2022-11-173-0/+171
Attestation is used to verify the trustworthiness of a TDX guest. During the guest bring-up, the Intel TDX module measures and records the initial contents and configuration of the guest, and at runtime, guest software uses runtime measurement registers (RMTRs) to measure and record details related to kernel image, command line params, ACPI tables, initrd, etc. At guest runtime, the attestation process is used to attest to these measurements. The first step in the TDX attestation process is to get the TDREPORT data. It is a fixed size data structure generated by the TDX module which includes the above mentioned measurements data, a MAC ID to protect the integrity of the TDREPORT, and a 64-Byte of user specified data passed during TDREPORT request which can uniquely identify the TDREPORT. Intel's TDX guest driver exposes TDX_CMD_GET_REPORT0 IOCTL interface to enable guest userspace to get the TDREPORT subtype 0. Add a kernel self test module to test this ABI and verify the validity of the generated TDREPORT. Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Kai Huang <kai.huang@intel.com> Acked-by: Wander Lairson Costa <wander@redhat.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Link: https://lore.kernel.org/all/20221116223820.819090-4-sathyanarayanan.kuppuswamy%40linux.intel.com