From: Peter Fang <peter.fang@intel.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Xu Yilun <yilun.xu@linux.intel.com>, <kas@kernel.org>,
<djbw@kernel.org>, <rick.p.edgecombe@intel.com>, <x86@kernel.org>,
<linux-coco@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
<kvm@vger.kernel.org>, <sohil.mehta@intel.com>,
<yilun.xu@intel.com>, <baolu.lu@linux.intel.com>,
<zhenzhong.duan@intel.com>, <xiaoyao.li@intel.com>
Subject: Re: [RFC PATCH 13/15] KVM: TDX: Support event-notify interrupts only with userspace quoting
Date: Sun, 14 Jun 2026 05:57:50 -0700 [thread overview]
Message-ID: <20260614125750.GB3425618@pedri> (raw)
In-Reply-To: <7090f4af-3a6d-40fd-82ab-0ba6272534dd@intel.com>
On Thu, Jun 11, 2026 at 10:36:52PM +0300, Adrian Hunter wrote:
> On 22/05/2026 06:41, Xu Yilun wrote:
> > From: Peter Fang <peter.fang@intel.com>
> >
> > Tie userspace SetupEventNotifyInterrupt support to userspace Quote
> > generation. Delivering event-notify interrupts via userspace breaks if
> > KVM never exits to userspace in the first place.
>
> Breaks how exactly?
>
> Seems like a TDX guest has no way to know whether the VMM will use
> the Event Notify Interrupt anyway, so it cannot rely upon it, so
> it should already handle the case when the interrupt does not fire.
Hm that's an interesting point. But isn't the whole point of
SetupEventNotifyInterrupt to set up a contract with the host VMM? The
GHCI spec is quite loose about this.
If we say "the host VMM is not required to honor this contract", then
maybe this doesn't truly break anything. But then this stance kind of
makes this whole feature moot, or at least not very useful?
Not adding this patch feels like making this problem worse, right?
Because now we will have platforms that won't ever fire these
interrupts, and the host still tells the guest SetupEventNotifyInterrupt
is supported.
>
> >
> > No known guest currently requires event-notify interrupt support, so
> > defer adding in-kernel support for now. Linux TDX guests use polling
> > only.
>
> If no guest is using it, then why does it need special treatment?
Just to maintain status quo basically. Seems like previously there was
some interest in adding this support to the guest at some point. This
patch simply turns off this feature when quoting is not done in
userspace. But platforms that do quoting in userspace (e.g. don't
support DICE extension) can observe the same behavior as today, if/when
such a guest comes into existence.
>
> >
> > @@ -7335,6 +7335,9 @@ inputs and outputs of the TDVMCALL. Currently the following values of
> > queued successfully, the TDX guest can poll the status field in the
> > shared-memory area to check whether the Quote generation is completed or
> > not. When completed, the generated Quote is returned via the same buffer.
> > + If the host kernel generates Quotes through the TDX Quoting service provided
> > + by the TDX module, KVM processes the GetQuote request and it will not appear
> > + in userspace.
>
> There is an Attestation section in Documentation/virt/kvm/x86/intel-tdx.rst
> that could be updated too.
Can you please point me to it? I couldn't find that section in that
file.
>
> > + KVM only supports version 1 of the GetQuote request.
>
> Is that relevant here?
Documenting this came up during some internal discussions. But yeah it
looks a bit out of place. I can remove it.
>
> >
> > * ``TDVMCALL_GET_TD_VM_CALL_INFO``: the guest has requested the support
> > status of TDVMCALLs. The output values for the given leaf should be
> > @@ -7342,7 +7345,10 @@ inputs and outputs of the TDVMCALL. Currently the following values of
> > field of the union.
> >
> > * ``TDVMCALL_SETUP_EVENT_NOTIFY_INTERRUPT``: the guest has requested to
> > - set up a notification interrupt for vector ``vector``.
> > + set up a notification interrupt for vector ``vector``. Since this TDVMCALL
> > + is used to optimize ``TDVMCALL_GET_QUOTE``, KVM disables this support in
> > + userspace VMM if ``TDVMCALL_GET_QUOTE`` is completely handled in the kernel.
> > + KVM may add kernel support for this in the future.
>
> Is that really necessary?
I think this is related to the discussion above about how hard host VMM
should try to honor the SetupEventNotifyInterrupt contract.
>
next prev parent reply other threads:[~2026-06-14 12:58 UTC|newest]
Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 3:41 [PATCH 00/15] Enable TDX Module Extensions and DICE-based TDX Quoting Xu Yilun
2026-05-22 3:41 ` [PATCH 01/15] x86/virt/tdx: Read global metadata for TDX Module Extensions Xu Yilun
2026-05-25 6:24 ` Xiaoyao Li
2026-05-25 6:54 ` Xiaoyao Li
2026-05-27 15:35 ` Kiryl Shutsemau
2026-05-28 4:25 ` Xu Yilun
2026-05-28 21:17 ` Edgecombe, Rick P
2026-05-29 15:34 ` Xu Yilun
2026-05-27 6:05 ` Sohil Mehta
2026-05-27 7:11 ` Xu Yilun
2026-05-27 17:17 ` Sohil Mehta
2026-05-28 3:48 ` Xu Yilun
2026-05-28 21:00 ` Edgecombe, Rick P
2026-05-29 16:59 ` Xu Yilun
2026-06-09 13:06 ` Adrian Hunter
2026-06-10 3:20 ` Xu Yilun
2026-06-12 22:20 ` Dan Williams (nvidia)
2026-05-22 3:41 ` [PATCH 02/15] x86/virt/tdx: Add extra memory to TDX Module for Extensions Xu Yilun
2026-05-25 8:56 ` Xiaoyao Li
2026-05-27 3:47 ` Xu Yilun
2026-05-27 6:38 ` Xiaoyao Li
2026-05-27 7:32 ` Xu Yilun
2026-05-27 8:18 ` Xiaoyao Li
2026-06-07 4:38 ` Kishen Maloor
2026-06-08 9:41 ` Xu Yilun
2026-06-09 13:38 ` Adrian Hunter
2026-06-10 5:13 ` Xu Yilun
2026-06-10 5:43 ` Adrian Hunter
2026-06-10 7:44 ` Xu Yilun
2026-06-12 23:49 ` Dan Williams (nvidia)
2026-05-22 3:41 ` [PATCH 03/15] x86/virt/tdx: Make TDX Module initialize Extensions Xu Yilun
2026-05-25 8:58 ` Xiaoyao Li
2026-06-05 8:46 ` Tony Lindgren
2026-06-09 15:14 ` Adrian Hunter
2026-06-10 8:09 ` Xu Yilun
2026-05-22 3:41 ` [PATCH 04/15] x86/virt/tdx: Enable the Extensions right after basic TDX Module init Xu Yilun
2026-05-25 6:00 ` Tony Lindgren
2026-05-27 4:02 ` Xu Yilun
2026-05-25 8:05 ` Xiaoyao Li
2026-05-28 21:32 ` Edgecombe, Rick P
2026-05-29 17:19 ` Xu Yilun
2026-06-07 4:38 ` Kishen Maloor
2026-06-08 10:12 ` Xu Yilun
2026-06-14 7:00 ` Peter Fang
2026-06-13 0:08 ` Dan Williams (nvidia)
2026-05-22 3:41 ` [RFC PATCH 05/15] x86/virt/tdx: Move tdx_tdr_pa() up in the file Xu Yilun
2026-05-28 21:32 ` Edgecombe, Rick P
2026-06-11 16:21 ` Adrian Hunter
2026-06-14 7:04 ` Peter Fang
2026-05-22 3:41 ` [RFC PATCH 06/15] x86/virt/tdx: Initialize Quoting extension during bringup Xu Yilun
2026-05-28 21:35 ` Edgecombe, Rick P
2026-06-14 7:10 ` Peter Fang
2026-06-11 16:22 ` Adrian Hunter
2026-06-14 7:20 ` Peter Fang
2026-06-13 0:00 ` Dan Williams (nvidia)
2026-06-14 7:50 ` Peter Fang
2026-05-22 3:41 ` [RFC PATCH 07/15] x86/virt/tdx: Prepare Quote buffer during extension bringup Xu Yilun
2026-05-28 22:30 ` Edgecombe, Rick P
2026-06-14 10:28 ` Peter Fang
2026-05-22 3:41 ` [RFC PATCH 08/15] x86/virt/tdx: Add interface to check Quoting availability Xu Yilun
2026-05-22 3:41 ` [RFC PATCH 09/15] x86/virt/tdx: Add interface to generate a Quote Xu Yilun
2026-05-28 22:30 ` Edgecombe, Rick P
2026-06-14 11:29 ` Peter Fang
2026-06-11 17:15 ` Adrian Hunter
2026-06-14 11:36 ` Peter Fang
2026-05-22 3:41 ` [RFC PATCH 10/15] x86/tdx: Move and rename Quote request structure Xu Yilun
2026-06-11 17:16 ` Adrian Hunter
2026-06-14 11:50 ` Peter Fang
2026-06-13 0:04 ` Dan Williams (nvidia)
2026-06-14 11:51 ` Peter Fang
2026-05-22 3:41 ` [RFC PATCH 11/15] KVM: TDX: Factor out userspace return path from tdx_get_quote() Xu Yilun
2026-05-22 3:41 ` [RFC PATCH 12/15] KVM: TDX: Add in-kernel Quote generation Xu Yilun
2026-06-13 0:20 ` Dan Williams (nvidia)
2026-06-14 11:57 ` Peter Fang
2026-05-22 3:41 ` [RFC PATCH 13/15] KVM: TDX: Support event-notify interrupts only with userspace quoting Xu Yilun
2026-06-11 19:36 ` Adrian Hunter
2026-06-14 12:57 ` Peter Fang [this message]
2026-05-22 3:41 ` [RFC PATCH 14/15] x86/virt/tdx: Embed version info in SEAMCALL leaf function definitions Xu Yilun
2026-05-25 9:00 ` Xiaoyao Li
2026-05-27 6:45 ` Xu Yilun
2026-05-27 7:44 ` Xiaoyao Li
2026-05-27 11:45 ` Xu Yilun
2026-06-12 5:47 ` Adrian Hunter
2026-06-13 15:55 ` Xu Yilun
2026-05-22 3:41 ` [RFC PATCH 15/15] x86/virt/tdx: Enable TDX Quoting extension Xu Yilun
[not found] ` <ahPbb1Ws9hBruJ2d@tlindgre-MOBL1>
2026-05-25 10:51 ` Xiaoyao Li
2026-05-26 9:00 ` Tony Lindgren
2026-05-26 15:45 ` Xu Yilun
2026-05-27 1:30 ` Xiaoyao Li
2026-06-07 4:41 ` Kishen Maloor
2026-06-08 15:10 ` Xu Yilun
2026-05-27 5:23 ` [PATCH 00/15] Enable TDX Module Extensions and DICE-based TDX Quoting Sohil Mehta
2026-05-27 10:38 ` Xu Yilun
2026-05-27 17:09 ` Sohil Mehta
2026-05-28 4:52 ` Xu Yilun
2026-05-28 19:50 ` Sohil Mehta
2026-06-01 9:36 ` Xu Yilun
2026-06-01 20:17 ` Sohil Mehta
2026-06-02 5:36 ` Xu Yilun
2026-06-07 4:36 ` Kishen Maloor
2026-06-08 6:54 ` Xu Yilun
2026-06-08 18:31 ` Adrian Hunter
2026-06-12 22:03 ` Dan Williams (nvidia)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260614125750.GB3425618@pedri \
--to=peter.fang@intel.com \
--cc=adrian.hunter@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=djbw@kernel.org \
--cc=kas@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=rick.p.edgecombe@intel.com \
--cc=sohil.mehta@intel.com \
--cc=x86@kernel.org \
--cc=xiaoyao.li@intel.com \
--cc=yilun.xu@intel.com \
--cc=yilun.xu@linux.intel.com \
--cc=zhenzhong.duan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox