Re: [RFC PATCH v3 08/27] x86/sgx: Initialize virtual EPC driver even when SGX driver is disabled

Jarkko Sakkinen
2021-02-02T23:07:53Z

On Mon, Feb 01, 2021 at 07:25:41AM -0800, Dave Hansen wrote:
> On 1/31/21 9:40 PM, Kai Huang wrote:
> >>> - ret = sgx_drv_init();
> >>> + /* Success if the native *or* virtual EPC driver initialized cleanly. */
> >>> + ret = !!sgx_drv_init() & !!sgx_vepc_init();
> >> If would create more dumb code and just add
> >>
> >> ret = sgx_vepc_init()
> >> if (ret)
> >> goto err_kthread;
>
> Jarkko, I'm not sure I understand this suggestion.

I refined it in my 2nd response to Kai:

https://lore.kernel.org/linux-sgx/YBmMrqxlTxClg9Eb@kernel.org/

/Jarkko