[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a3bf16a-5ad2-39b0-c68d-f36d40b8dfc4@intel.com>
Date: Tue, 21 Mar 2023 21:01:17 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: "Li, Xin3" <xin3.li@...el.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
"H. Peter Anvin" <hpa@...or.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>,
"Christopherson,, Sean" <seanjc@...gle.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"Shankar, Ravi V" <ravi.v.shankar@...el.com>
Subject: Re: [PATCH v5 22/34] x86/fred: FRED initialization code
On 3/21/23 19:22, Li, Xin3 wrote:
>> If there is no other concrete reason other than overflowing for assigning NMI and
>> #DB with a stack level > 0, #VE should also be assigned with a stack level > 0, and
>> #BP too. #VE can happen anytime and anywhere, so it is subject to overflowing too.
> With IDT, both #VE and #BP do not use IST, but NMI, #DB, #MC and #DF do.
>
> Let's keep this "secret" logic for now, i.e., not change the stack levels
> for #VE and #BP at this point. We can do "optimization", i.e., change them
> later 😄.
#VE also can't happen anywhere. There is some documentation about it in
here:
https://docs.kernel.org/x86/tdx.html#linux-ve-handler
But, basically, the only halfway sane thing a guest might do to hit a
#VE is touch some "MMIO". The host can *not* cause them in arbitrary
places because of the SEPT_VE_DISABLE attribute.
#VE's also can't nest until after the guest retrieves the "VE info".
That means that the #VE handler at _least_ reaches C code before it's
subject to another #VE and that second one would still need to be
induced by something the guest does explicitly.
Powered by blists - more mailing lists