lkml.org 
[lkml]   [2012]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] cpu: intel, amd: mask cleared cpuid features
    On 07/20/2012 09:37 AM, Vladimir Davydov wrote:
    > If 'clearcpuid=N' is specified in boot options, CPU feature #N won't be
    > reported in /proc/cpuinfo and used by the kernel. However, if a
    > userpsace process checks CPU features directly using the cpuid
    > instruction, it will be reported about all features supported by the CPU
    > irrespective of what features are cleared.
    >
    > The patch makes the clearcpuid boot option not only clear CPU features
    > in kernel but also mask them in hardware for Intel and AMD CPUs that
    > support it so that the features cleared won't be reported even by the
    > cpuid instruction.
    >
    > This can be useful for migration of virtual machines managed by
    > hypervisors that do not support/use Intel VT/AMD-V hardware-assisted
    > virtualization technology.
    >
    > If CPUID masking is supported, this will be reported in
    > /proc/cpuinfo:flags as 'cpuidmask'.

    I am a bit concerned about this patch:

    1. it silently changes existing behavior.
    2. even on enabled hardware, only some of the bits are maskable.

    -hpa




    \
     
     \ /
      Last update: 2012-07-20 20:01    [W:0.037 / U:0.016 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site