Re: [PATCH v16.1] KVM: selftests: Add support for TDX ucalls, via TDVMCALL_REPORT_FATAL_ERROR

From: Ackerley Tng

Date: Mon Nov 09 2026 - 15:20:58 EST


Sean Christopherson <seanjc@xxxxxxxxxx> writes:

>
> [...snip...]
>
> diff --git a/tools/testing/selftests/kvm/include/x86/tdx/tdx.h b/tools/testing/selftests/kvm/include/x86/tdx/tdx.h
> index d41a1efc8a63..9982aaaba885 100644
> --- a/tools/testing/selftests/kvm/include/x86/tdx/tdx.h
> +++ b/tools/testing/selftests/kvm/include/x86/tdx/tdx.h
> @@ -4,6 +4,13 @@
>
> #include <linux/types.h>
>
> +/* TDX hypercall Leaf IDs */
> +#define TDVMCALL_GET_TD_VM_CALL_INFO 0x10000
> +#define TDVMCALL_MAP_GPA 0x10001
> +#define TDVMCALL_GET_QUOTE 0x10002
> +#define TDVMCALL_REPORT_FATAL_ERROR 0x10003
> +#define TDVMCALL_SETUP_EVENT_NOTIFY_INTERRUPT 0x10004
> +

No objection, just surprised you'd add all the others that aren't used
in this patch.

Reviewed-by: Ackerley Tng <ackerleytng@xxxxxxxxxx>

> u64 __tdvmcall(u64 fn, u64 r12, u64 r13, u64 r14, u64 r15);
>
> #endif /* SELFTEST_KVM_TDX_TDX_H */
>
> [...snip...]
>