On 11/15/18 5:01 PM, Jarkko Sakkinen wrote:
> +static void detect_sgx(struct cpuinfo_x86 *c)
> +{
> +     unsigned long long fc;
> +
> +     rdmsrl(MSR_IA32_FEATURE_CONTROL, fc);
> +     if (!(fc & FEATURE_CONTROL_LOCKED)) {
> +             pr_err_once("sgx: IA32_FEATURE_CONTROL MSR is not locked\n");
> +             goto out_unsupported;
> +     }

This needs a check against the config option somewhere so the compiler
can toss it in its entirety if SGX is config'd out.

Reply via email to