lkml.org 
[lkml]   [2017]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v9 2/5] x86/cpuid: Add generic table for cpuid dependencies
    On Fri, 6 Oct 2017, Andi Kleen wrote:

    > From: Andi Kleen <ak@linux.intel.com>
    >
    > Some CPUID features depend on other features. Currently it's
    > possible to to clear dependent features, but not clear the base features,
    > which can cause various interesting problems.
    >
    > This patch implements a generic table to describe dependencies
    > between CPUID features, to be used by all code that clears
    > CPUID.
    >
    > Some subsystems (like XSAVE) had an own implementation of this,
    > but it's better to do it all in a single place for everyone.
    >
    > Then clear_cpu_cap and setup_clear_cpu_cap always look up
    > this table and clear all dependencies too.
    >
    > This is intended to be a practical table: only for features
    > that make sense to clear. If someone for example clears FPU,
    > or other features that are essentially part of the required
    > base feature set, not much is going to work. Handling
    > that is right now out of scope. We're only handling
    > features which can be usefully cleared.
    >
    > v2: Add EXPORT_SYMBOL for clear_cpu_cap for lguest
    > v3:
    > Fix handling of depending issues
    > Fix dups in the table (Jonathan McDowell)
    > v4:
    > Remove EXPORT_SYMBOL again as lguest is gone
    > Restructure dependencies as feature, dependency (Thomas Gleixner)
    > Move some code from header file to C file and turn macros into inlines (dito)
    > Simplify if conditions (dito)
    > Add missing dependency for AVX512F->AVX
    > v5:
    > Remove redundant dependency for AVX512F->XSAVE (Thomas Gleixner)
    > Add missing dependency for XMM->FXSR (Thomas Gleixner)
    > v6:
    > Add SHA_NI->XMM and FXSR_OPT->FXSAVE dependencies
    > Cc: Jonathan McDowell <noodles@earth.li>
    > Signed-off-by: Andi Kleen <ak@linux.intel.com>

    Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

    \
     
     \ /
      Last update: 2017-10-08 10:36    [W:4.789 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site