[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <86d71f0c-6859-477a-88a2-416e46847f2f@linux.intel.com>
Date: Mon, 25 Nov 2024 09:25:56 +0800
From: Binbin Wu <binbin.wu@...ux.intel.com>
To: seanjc@...gle.com, Adrian Hunter <adrian.hunter@...el.com>,
pbonzini@...hat.com
Cc: dave.hansen@...ux.intel.com, kvm@...r.kernel.org,
rick.p.edgecombe@...el.com, kai.huang@...el.com, reinette.chatre@...el.com,
xiaoyao.li@...el.com, tony.lindgren@...ux.intel.com, dmatlack@...gle.com,
isaku.yamahata@...el.com, nik.borisov@...e.com,
linux-kernel@...r.kernel.org, x86@...nel.org, yan.y.zhao@...el.com,
chao.gao@...el.com, weijiang.yang@...el.com
Subject: Re: [PATCH 0/7] KVM: TDX: TD vcpu enter/exit
On 11/22/2024 4:14 AM, Adrian Hunter wrote:
[...]
> - tdx_vcpu_enter_exit() calls guest_state_enter_irqoff()
> and guest_state_exit_irqoff() which comments say should be
> called from non-instrumentable code but noinst was removed
> at Sean's suggestion:
> https://lore.kernel.org/all/Zg8tJspL9uBmMZFO@google.com/
> noinstr is also needed to retain NMI-blocking by avoiding
> instrumented code that leads to an IRET which unblocks NMIs.
> A later patch set will deal with NMI VM-exits.
>
In https://lore.kernel.org/all/Zg8tJspL9uBmMZFO@google.com, Sean mentioned:
"The reason the VM-Enter flows for VMX and SVM need to be noinstr is they do things
like load the guest's CR2, and handle NMI VM-Exits with NMIs blocks. None of
that applies to TDX. Either that, or there are some massive bugs lurking due to
missing code."
I don't understand why handle NMI VM-Exits with NMIs blocks doesn't apply to
TDX. IIUIC, similar to VMX, TDX also needs to handle the NMI VM-exit in the
noinstr section to avoid the unblock of NMIs due to instrumentation-induced
fault.
Powered by blists - more mailing lists