[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e6fedf41180a98068c0b410b628f14cb85cad93f.camel@intel.com>
Date: Fri, 20 Jun 2025 17:47:02 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Li, Xiaoyao" <xiaoyao.li@...el.com>, "pbonzini@...hat.com"
<pbonzini@...hat.com>
CC: "mikko.ylinen@...ux.intel.com" <mikko.ylinen@...ux.intel.com>,
"seanjc@...gle.com" <seanjc@...gle.com>, "Huang, Kai" <kai.huang@...el.com>,
"Yao, Jiewen" <jiewen.yao@...el.com>, "binbin.wu@...ux.intel.com"
<binbin.wu@...ux.intel.com>, "Lindgren, Tony" <tony.lindgren@...el.com>,
"Chatre, Reinette" <reinette.chatre@...el.com>, "Hunter, Adrian"
<adrian.hunter@...el.com>, "Zhao, Yan Y" <yan.y.zhao@...el.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>, "Yamahata, Isaku"
<isaku.yamahata@...el.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "Shutemov, Kirill"
<kirill.shutemov@...el.com>
Subject: Re: [PATCH v2 0/3] TDX attestation support and GHCI fixup
On Fri, 2025-06-20 at 19:24 +0200, Paolo Bonzini wrote:
> On Fri, Jun 20, 2025 at 2:48 PM Xiaoyao Li <xiaoyao.li@...el.com> wrote:
> > > The interface I chose is that KVM always exits, but it initializes the
> > > output values such that userspace can leave them untouched for unknown
> > > TDVMCALLs or unknown leaves. So there is no need for this.
> > >
> > > Querying kernel support of other services can be added later, but
> > > unless the GHCI adds more input or output fields to TdVmCallInfo there
> > > is no need to limit the userspace exit to leaf 1.
> >
> > I meant the case where KVM is going to support another optional TDVMCALL
> > leaf in the future, e.g., SetEventNotifyInterrupt. At that time,
> > userspace needs to differentiate between old KVM which only supports
> > <GetQuote> and new KVM which supports both <GetQuote> and
> > <SetEventNotifyInterrupt>.
>
> Yeah, I see what you mean now. Userspace cannot know which TDVMCALL
> will exit, other than GET_QUOTE which we know is in the first part.
How about we expose the KVM supported GHCI exits in KVM_TDX_CAPABILITIES? We had
been discussing this as an option. It is not needed for the initial fixup series
I think.
It can include GHCI calls handled within KVM, and ones that are supported via
exits.
>
> By the way I'm tempted to implement SetupEventNotifyInterrupt as well,
> it's just a handful of lines of code.
Seems ok to me. In general I think we should lean towards implementing the
minimum. It seems we are still in the learning period and have already had some
TDX arch course corrections. If a GetQuote2, SetEventNotifyInterrupt2, etc shows
up, it all starts to add up. Having a KVM_EXIT_TDX will help there, from the KVM
side at least.
Powered by blists - more mailing lists