On 06/20/2014 09:17 AM, Dave Hansen wrote:
> +/* These features, although they might be available in a CPU
> + * will not be used because the compile options to support
> + * them are not present.
> + *
> + * This code allows them to be checked and disabled at
> + * compile time withut an explicit #ifdef.  Simply call
> + * cpu_has() or this_cpu_has().
> + * */
> +
> +#ifdef CONFIG_X86_INTEL_MPX
> +# define HAVE_MPX    (1<<(X86_FEATURE_MPX & 31))
> +#else
> +# define HAVE_MPX    0
> +#endif

Urg.  arch/x86/kvm/vmx.c has:

        if (boot_cpu_has(X86_FEATURE_MPX))
                rdmsrl(MSR_IA32_BNDCFGS, vmx->host_state.msr_host_...

And in that case we really _do_ want to test the actual CPU bit, despite
how we've configured MPX in the host kernel.  We can call test_cpu_cap()
directly, I guess.  But, all these interfaces are getting confusing. :(
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to