Thread (155 messages) 155 messages, 7 authors, 2021-02-05

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

From: Jarkko Sakkinen <jarkko@kernel.org>
Date: 2021-02-02 23:08:09

On Mon, Feb 01, 2021 at 07:25:41AM -0800, Dave Hansen wrote:
On 1/31/21 9:40 PM, Kai Huang wrote:
quoted
quoted
quoted
-	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/ (local)

/Jarkko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help