Hello, On 6/20/25 18:40, Paolo Bonzini wrote:
From: Isaku Yamahata <[email protected]>Add property "quote-generation-socket" to tdx-guest, which is a property of type SocketAddress to specify Quote Generation Service(QGS). On request of GetQuote, it connects to the QGS socket, read request data from shared guest memory, send the request data to the QGS, and store the response into shared guest memory, at last notify TD guest by interrupt. command line example: qemu-system-x86_64 \ -object '{"qom-type":"tdx-guest","id":"tdx0","quote-generation-socket":{"type":"unix", "path":"/var/run/tdx-qgs/qgs.socket"}}' \ -machine confidential-guest-support=tdx0 Note, above example uses the unix socket. It can be other types, like vsock, which depends on the implementation of QGS. To avoid no response from QGS server, setup a timer for the transaction. If timeout, make it an error and interrupt guest. Define the threshold of time to 30s at present, maybe change to other value if not appropriate. Signed-off-by: Isaku Yamahata <[email protected]> Co-developed-by: Chenyi Qiang <[email protected]> Signed-off-by: Chenyi Qiang <[email protected]> Co-developed-by: Xiaoyao Li <[email protected]> Signed-off-by: Xiaoyao Li <[email protected]> Tested-by: Xiaoyao Li <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> --- qapi/qom.json | 8 +- target/i386/kvm/tdx-quote-generator.h | 82 +++++++ target/i386/kvm/tdx.h | 10 + target/i386/kvm/kvm.c | 3 + target/i386/kvm/tdx-quote-generator.c | 300 ++++++++++++++++++++++++++ target/i386/kvm/tdx-stub.c | 4 + target/i386/kvm/tdx.c | 176 ++++++++++++++- target/i386/kvm/meson.build | 2 +- 8 files changed, 582 insertions(+), 3 deletions(-) create mode 100644 target/i386/kvm/tdx-quote-generator.h create mode 100644 target/i386/kvm/tdx-quote-generator.c
These changes broke the build on 32-bit host. Could you please send a patch to avoid compiling TDX in such environment ? Thanks, C.
