Re: [RFC PATCH v5 07/26] x86/sgx: Initialize virtual EPC driver even when SGX driver is disabled

Dave Hansen
2021-02-16T18:42:00Z

On 2/13/21 5:29 AM, Kai Huang wrote:
> Modify sgx_init() to always try to initialize the virtual EPC driver,
> even if the SGX driver is disabled. The SGX driver might be disabled
> if SGX Launch Control is in locked mode, or not supported in the
> hardware at all. This allows (non-Linux) guests that support non-LC
> configurations to use SGX.
>
> Signed-off-by: Kai Huang <kai.huang@intel.com>
...
> + ret = !!sgx_drv_init() & !!sgx_vepc_init();

That little nugget is starting to grow on me.

Acked-by: Dave Hansen <dave.hansen@intel.com>