1. 12 May, 2010 1 commit
    • H. Peter Anvin's avatar
      x86: Add new static_cpu_has() function using alternatives · a3c8acd0
      H. Peter Anvin authored
      For CPU-feature-specific code that touches performance-critical paths,
      introduce a static patching version of [boot_]cpu_has().  This is run
      at alternatives time and is therefore not appropriate for most
      initialization code, but on the other hand initialization code is
      generally not performance critical.
      
      On gcc 4.5+ this uses the new "asm goto" feature.
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      LKML-Reference: <1273135546-29690-2-git-send-email-avi@redhat.com>
      a3c8acd0
  2. 10 May, 2010 4 commits
    • H. Peter Anvin's avatar
      x86, fpu: Use the proper asm constraint in use_xsave() · dce8bf4e
      H. Peter Anvin authored
      The proper constraint for a receiving 8-bit variable is "=qm", not
      "=g" which equals "=rim"; even though the "i" will never match, bugs
      can and do happen due to the difference between "q" and "r".
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      LKML-Reference: <1273135546-29690-2-git-send-email-avi@redhat.com>
      dce8bf4e
    • H. Peter Anvin's avatar
      x86, fpu: Unbreak FPU emulation · c3f8978e
      H. Peter Anvin authored
      Unbreak FPU emulation, broken by checkin
      86603283:
      x86: Introduce 'struct fpu' and related API
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      LKML-Reference: <1273135546-29690-3-git-send-email-avi@redhat.com>
      c3f8978e
    • Avi Kivity's avatar
      x86: Introduce 'struct fpu' and related API · 86603283
      Avi Kivity authored
      Currently all fpu state access is through tsk->thread.xstate.  Since we wish
      to generalize fpu access to non-task contexts, wrap the state in a new
      'struct fpu' and convert existing access to use an fpu API.
      
      Signal frame handlers are not converted to the API since they will remain
      task context only things.
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      Acked-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      LKML-Reference: <1273135546-29690-3-git-send-email-avi@redhat.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      86603283
    • Avi Kivity's avatar
      x86: Eliminate TS_XSAVE · c9ad4882
      Avi Kivity authored
      The fpu code currently uses current->thread_info->status & TS_XSAVE as
      a way to distinguish between XSAVE capable processors and older processors.
      The decision is not really task specific; instead we use the task status to
      avoid a global memory reference - the value should be the same across all
      threads.
      
      Eliminate this tie-in into the task structure by using an alternative
      instruction keyed off the XSAVE cpu feature; this results in shorter and
      faster code, without introducing a global memory reference.
      
      [ hpa: in the future, this probably should use an asm jmp ]
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      Acked-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      LKML-Reference: <1273135546-29690-2-git-send-email-avi@redhat.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      c9ad4882
  3. 03 May, 2010 4 commits
  4. 30 Apr, 2010 31 commits