Add TDX guest attestation infrastructure and driver
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEV76QKkVc4xCGURexaDWVMHDJkrAFAmOXYmwACgkQaDWVMHDJ krD8hg/+J0hUTfljmlCctwGZyqVR3Y2E722wL9oTvbgYiUAtFrARzfPF0WNwvHi5 Ywvod5hQ4unPoluthdVAD/uJqcPVhjIZ7CvNTGrS8J7ED5x5ydGLNWAL3Rn+9s6O xkz/DsV4zl+cPQ60XLsO+3Mc6RhwVs9DUthpUovl22epmgmRPCovkHWkvQsZajJq ceF/78ThfrkG4dDouaIXi1gsmKLLzU4KdHeBATMg0bgPQXFJZSGBCLaeJXWmLapq 7N3SznUqDMn4Plr/IuP4XuMA6VTVojrakCcBmw5SGVqhkVWGM1/FMg7jHSQS7Z5V 5uG7CkhTBqh17v9xKwDMPh34D51TLtNifA7jbecyL5155czFkj7BoSwEFINU/wCz agUO9NvK9j1chUnA2UGqGQigM3nWGZHMwaQjfgBWyq5gqF8HURUUrjx6XuunOfmB 1byyrDu0g48u/zaQ/RpNfewz1ZY+WylDPcqOhYaVWF1PYThStML/VMBKpdsl1Ovw nytUdQsaBIjFHQdB+snizaF93+/0FG+FTGAlDnHYmey/8plL2LYuzrcDnDYnGEXa tN3HFd2lAi4JBLmvmgF39gH+BLXuKTLweIhwTXZTn91cfire3yxiXAnLd0tuptMP aXFddxKMdMpxTqzy2X+8gJjqCr2lZ9gZkxaPsWwrBM+xrJf0p2w= =JGnq -----END PGP SIGNATURE----- Merge tag 'x86_tdx_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 tdx updates from Dave Hansen: "This includes a single chunk of new functionality for TDX guests which allows them to talk to the trusted TDX module software and obtain an attestation report. This report can then be used to prove the trustworthiness of the guest to a third party and get access to things like storage encryption keys" * tag 'x86_tdx_for_6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/tdx: Test TDX attestation GetReport support virt: Add TDX guest driver x86/tdx: Add a wrapper to get TDREPORT0 from the TDX Module
This commit is contained in:
commit
a89ef2aa55
15 changed files with 469 additions and 0 deletions
42
include/uapi/linux/tdx-guest.h
Normal file
42
include/uapi/linux/tdx-guest.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Userspace interface for TDX guest driver
|
||||
*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_LINUX_TDX_GUEST_H_
|
||||
#define _UAPI_LINUX_TDX_GUEST_H_
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Length of the REPORTDATA used in TDG.MR.REPORT TDCALL */
|
||||
#define TDX_REPORTDATA_LEN 64
|
||||
|
||||
/* Length of TDREPORT used in TDG.MR.REPORT TDCALL */
|
||||
#define TDX_REPORT_LEN 1024
|
||||
|
||||
/**
|
||||
* struct tdx_report_req - Request struct for TDX_CMD_GET_REPORT0 IOCTL.
|
||||
*
|
||||
* @reportdata: User buffer with REPORTDATA to be included into TDREPORT.
|
||||
* Typically it can be some nonce provided by attestation
|
||||
* service, so the generated TDREPORT can be uniquely verified.
|
||||
* @tdreport: User buffer to store TDREPORT output from TDCALL[TDG.MR.REPORT].
|
||||
*/
|
||||
struct tdx_report_req {
|
||||
__u8 reportdata[TDX_REPORTDATA_LEN];
|
||||
__u8 tdreport[TDX_REPORT_LEN];
|
||||
};
|
||||
|
||||
/*
|
||||
* TDX_CMD_GET_REPORT0 - Get TDREPORT0 (a.k.a. TDREPORT subtype 0) using
|
||||
* TDCALL[TDG.MR.REPORT]
|
||||
*
|
||||
* Return 0 on success, -EIO on TDCALL execution failure, and
|
||||
* standard errno on other general error cases.
|
||||
*/
|
||||
#define TDX_CMD_GET_REPORT0 _IOWR('T', 1, struct tdx_report_req)
|
||||
|
||||
#endif /* _UAPI_LINUX_TDX_GUEST_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue