[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 13/30] xen/x86: Clear dependent features when clearing a cpu cap



>>> On 05.02.16 at 14:42, <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/cpu/common.c
> +++ b/xen/arch/x86/cpu/common.c
> @@ -53,8 +53,24 @@ static unsigned int cleared_caps[NCAPINTS];
>  
>  void __init setup_clear_cpu_cap(unsigned int cap)
>  {
> +     const uint32_t *dfs;
> +     unsigned int i;
> +
> +     if ( test_bit(cap, cleared_caps) )
> +             return;
> +
>       __clear_bit(cap, boot_cpu_data.x86_capability);
>       __set_bit(cap, cleared_caps);

Perhaps __test_and_set_bit() above?

> +     dfs = lookup_deep_deps(cap);

Ah, this is a use I can see as valid outside of cpuid.c, but it's still
(as I had expected) one from an __init function.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.