Re: [PATCH 1/2] KVM: TDX: Handle TDG.VP.VMCALL<GetQuote>
From: Huang, Kai
Date: Wed Apr 02 2025 - 04:59:59 EST
On Wed, 2025-04-02 at 00:53 +0000, Huang, Kai wrote:
> >
> > KVM forwards the request to userspace VMM (e.g., QEMU) and userspace VMM
> > queues the operation asynchronously.
> >
>
> I think the key is GetQuote is asynchronous therefore KVM will return to guest
> immediately after forwarding to userspace. Whether *userspace* queues the
> operation asynchronously doesn't matter.
>
> > After the TDVMCALL is returned and
> > back to TDX guest, TDX guest can poll the status field of the shared-memory
> > area.
>
> How about combing the above two paragraphs into:
>
> GetQuote is an asynchronous request. KVM returns to userspace immediately after
> forwarding the request to userspace. The TDX guest then needs to poll the
> status field of the shared buffer (or wait for notification if enabled) to tell
> whether the Quote is ready.
I was thinking too quickly (since needed to pickup kids) and missed that it is
*userspace* who makes the GetQuote asynchronous. Sorry for the noise and please
ignore the above comment :-)