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

Jarkko Sakkinen
2021-02-03T22:04:03Z

On Wed, Feb 03, 2021 at 01:49:06PM +1300, Kai Huang wrote:
> What working *incorrectly* thing is related to SGX virtualization? The things
> SGX virtualization requires (basically just raw EPC allocation) are all in
> sgx/main.c.

States:

A. SGX driver is unsupported.
B. SGX driver is supported and initialized correctly.
C. SGX driver is supported and failed to initialize.

I just thought that KVM should support SGX when we are either in states A
or B. Even the short summary implies this. It is expected that SGX driver
initializes correctly if it is supported in the first place. If it doesn't,
something is probaly seriously wrong. That is something we don't expect in
a legit system behavior.

/Jarkko