[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <274d996d-44fc-08d5-993c-d947537fc6a6@intel.com>
Date: Mon, 19 Oct 2020 10:58:26 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Sean Christopherson <sean.j.christopherson@...el.com>
Cc: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>, x86@...nel.org,
linux-sgx@...r.kernel.org, linux-kernel@...r.kernel.org,
Jethro Beekman <jethro@...tanix.com>,
Darren Kenny <darren.kenny@...cle.com>,
akpm@...ux-foundation.org, andriy.shevchenko@...ux.intel.com,
asapek@...gle.com, bp@...en8.de, cedric.xing@...el.com,
chenalexchen@...gle.com, conradparker@...gle.com,
cyhanish@...gle.com, haitao.huang@...el.com, kai.huang@...el.com,
kai.svahn@...el.com, kmoy@...gle.com, ludloff@...gle.com,
luto@...nel.org, nhorman@...hat.com, npmccallum@...hat.com,
puiterwijk@...hat.com, rientjes@...gle.com, tglx@...utronix.de,
yaozhangx@...gle.com, mikko.ylinen@...el.com
Subject: Re: [PATCH v39 05/24] x86/sgx: Add wrappers for ENCLS leaf functions
On 10/19/20 10:53 AM, Sean Christopherson wrote:
>>> SGX1 CPUs take an erratum on the #PF behavior, e.g. "KBW90 Violation of Intel
>>> SGX Access-Control Requirements Produce #GP Instead of #PF".
>>>
>>> https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e3-1200v6-spec-update.pdf
>> OK, but that's only for "Intel ® Xeon ® E3-1200 v6 Processor Family",
>> specifically stepping B-0. That's far from a broad erratum. I *see* it
>> in other errata lists, but I still think this is too broad.
>>
>> Also, what if a hypervisor masks the SGX2 cpuid bit on SGX2-capable
>> hardware? Won't the hardware still exhibit the erratum?
>>
>> I don't think we can control model-specific errata behavior with an
>> architectural CPUID bit.
> Hmm, true. Checking for #PF _or_ #GP on SGX1 CPUs would be my first choice.
> ENCLS #GPs for other reasons, most of which would indicate a kernel bug. It'd
> be nice to limit the "#GP is expected, sort of" behavior to CPUs that might be
> affected by an erratum.
Yes, agreed.
We need a model/family/stepping list of all the affected CPUs, and a
normal old match_cpu() or whatever. If a hypervisor lies about
model/family/stepping, then the fallout is on them, not the guest.
Powered by blists - more mailing lists