Re: [PATCH v16.1] KVM: selftests: Add support for TDX ucalls, via TDVMCALL_REPORT_FATAL_ERROR
From: Sean Christopherson
Date: Tue Nov 10 2026 - 14:10:18 EST
On Mon, Nov 09, 2026, Ackerley Tng wrote:
> 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.
It's nice to have, e.g. provides additional context to help understand what types
of things TDVMCALL does "natively. And I almost always do lookups for things like
this and MSR indices using kernel headers, e.g. versus trying to hunt through a
PDF (assuming I even have or know the "right" PDF).