1. 24 10月, 2012 2 次提交
    • V
      perf/x86: Fix P6 FP_ASSIST event constraint · 7991c9ca
      Vince Weaver 提交于
      According to Intel SDM Volume 3B, FP_ASSIST is limited to Counter 1 only,
      not Counter 0.
      
      Tested on a Pentium II.
      Signed-off-by: NVince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1210191728570.14552@vincent-weaver-1.um.maine.eduSigned-off-by: NIngo Molnar <mingo@kernel.org>
      7991c9ca
    • A
      x86/perf: Fix virtualization sanity check · bffd5fc2
      Andre Przywara 提交于
      In check_hw_exists() we try to detect non-emulated MSR accesses
      by writing an arbitrary value into one of the PMU registers
      and check if it's value after a readout is still the same.
      This algorithm silently assumes that the register does not contain
      the magic value already, which is wrong in at least one situation.
      
      Fix the algorithm to really do a read-modify-write cycle. This fixes
      a warning under Xen under some circumstances on AMD family 10h CPUs.
      
      The reasons in more details actually sound like a story from
      Believe It or Not!:
      
      First you need an AMD family 10h/12h CPU. These do not reset the
      PERF_CTR registers on a reboot.
      Now you boot bare metal Linux, which goes successfully through this
      check, but leaves the magic value of 0xabcd in the register. You
      don't use the performance counters, but do a reboot (warm reset).
      Then you choose to boot Xen. The check will be triggered with a
      recent Linux kernel as Dom0 again, trying to write 0xabcd into the
      MSR. Xen silently drops the write (expected), but the subsequent read
      will return the value in the register, which just happens to be the
      expected magic value. Thus the test misleadingly succeeds, leaving
      the kernel in the belief that the PMU is available. This will trigger
      the following message:
      
      [    0.020294] ------------[ cut here ]------------
      [    0.020311] WARNING: at arch/x86/xen/enlighten.c:730 xen_apic_write+0x15/0x17()
      [    0.020318] Hardware name: empty
      [    0.020323] Modules linked in:
      [    0.020334] Pid: 1, comm: swapper/0 Not tainted 3.3.8 #7
      [    0.020340] Call Trace:
      [    0.020354]  [<ffffffff81050379>] warn_slowpath_common+0x80/0x98
      [    0.020369]  [<ffffffff810503a6>] warn_slowpath_null+0x15/0x17
      [    0.020378]  [<ffffffff810034df>] xen_apic_write+0x15/0x17
      [    0.020392]  [<ffffffff8101cb2b>] perf_events_lapic_init+0x2e/0x30
      [    0.020410]  [<ffffffff81ee4dd0>] init_hw_perf_events+0x250/0x407
      [    0.020419]  [<ffffffff81ee4b80>] ? check_bugs+0x2d/0x2d
      [    0.020430]  [<ffffffff81002181>] do_one_initcall+0x7a/0x131
      [    0.020444]  [<ffffffff81edbbf9>] kernel_init+0x91/0x15d
      [    0.020456]  [<ffffffff817caaa4>] kernel_thread_helper+0x4/0x10
      [    0.020471]  [<ffffffff817c347c>] ? retint_restore_args+0x5/0x6
      [    0.020481]  [<ffffffff817caaa0>] ? gs_change+0x13/0x13
      [    0.020500] ---[ end trace a7919e7f17c0a725 ]---
      
      The new code will change every of the 16 low bits read from the
      register and tries to write and read-back that modified number
      from the MSR.
      Signed-off-by: NAndre Przywara <andre.przywara@amd.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Avi Kivity <avi@redhat.com>
      Link: http://lkml.kernel.org/r/1349797115-28346-2-git-send-email-andre.przywara@amd.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      bffd5fc2
  2. 20 10月, 2012 1 次提交
  3. 19 10月, 2012 1 次提交
  4. 18 10月, 2012 1 次提交
  5. 16 10月, 2012 1 次提交
  6. 05 10月, 2012 1 次提交
  7. 04 10月, 2012 2 次提交
  8. 03 10月, 2012 1 次提交
  9. 28 9月, 2012 2 次提交
    • N
      x86/mce: Provide boot argument to honour bios-set CMCI threshold · 450cc201
      Naveen N. Rao 提交于
      The ACPI spec doesn't provide for a way for the bios to pass down
      recommended thresholds to the OS on a _per-bank_ basis. This patch adds
      a new boot option, which if passed, tells Linux to use CMCI thresholds
      set by the bios.
      
      As fail-safe, we initialize threshold to 1 if some banks have not been
      initialized by the bios and warn the user.
      Signed-off-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      450cc201
    • H
      x86, smep, smap: Make the switching functions one-way · b2cc2a07
      H. Peter Anvin 提交于
      There is no fundamental reason why we should switch SMEP and SMAP on
      during early cpu initialization just to switch them off again.  Now
      with %eflags and %cr4 forced to be initialized to a clean state, we
      only need the one-way enable.  Also, make the functions inline to make
      them (somewhat) harder to abuse.
      
      This does mean that SMEP and SMAP do not get initialized anywhere near
      as early.  Even using early_param() instead of __setup() doesn't give
      us control early enough to do this during the early cpu initialization
      phase.  This seems reasonable to me, because SMEP and SMAP should not
      matter until we have userspace to protect ourselves from, but it does
      potentially make it possible for a bug involving a "leak of
      permissions to userspace" to get uncaught.
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      b2cc2a07
  10. 27 9月, 2012 1 次提交
  11. 26 9月, 2012 1 次提交
  12. 22 9月, 2012 2 次提交
  13. 19 9月, 2012 4 次提交
  14. 18 9月, 2012 1 次提交
  15. 13 9月, 2012 3 次提交
  16. 04 9月, 2012 1 次提交
  17. 14 8月, 2012 4 次提交
  18. 10 8月, 2012 2 次提交
    • C
      x86/mce: Add CMCI poll mode · 55babd8f
      Chen Gong 提交于
      On Intel systems corrected machine check interrupts (CMCI) may be sent to
      multiple logical processors; possibly to all processors on the affected
      socket (SDM Volume 3B "15.5.1 CMCI Local APIC Interface").  This means
      that a persistent error (such as a stuck bit in ECC memory) may cause
      a storm of interrupts that greatly hinders or prevents forward progress
      (probably on many processors).
      
      To solve this we keep track of the rate at which each processor sees
      CMCI. If we exceed a threshold, we disable CMCI delivery and switch to
      polling the machine check banks. If the storm subsides (none of the
      affected processors see any more errors for a complete poll interval) we
      re-enable CMCI.
      
      [Tony: Added console messages when storm begins/ends and increased storm
      threshold from 5 to 15 so we have a few more logged entries before we
      disable interrupts and start dropping reports]
      Signed-off-by: NChen Gong <gong.chen@linux.intel.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NChen Gong <gong.chen@linux.intel.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      55babd8f
    • T
      x86/mce: Make cmci_discover() quiet · 4670a300
      Tony Luck 提交于
      cmci_discover() works out which machine check banks support CMCI, and
      which of those are shared by multiple logical processors. It uses this
      information to ensure that exactly one cpu is designated the owner of
      each bank so that when interrupts are broadcast to multiple cpus, only one
      of them will look in a shared bank to log the error and clear the bank.
      
      At boot time cmci_discover() performs this task silently. But during
      certain cpu hotplug operations it prints out a set of summary lines
      like this:
      
      CPU 35 MCA banks CMCI:0 CMCI:1 CMCI:3 CMCI:5 CMCI:6 CMCI:7 CMCI:8 CMCI:9 CMCI:10 CMCI:11
      CPU 1 MCA banks CMCI:0 CMCI:1 CMCI:3
      CPU 39 MCA banks CMCI:0 CMCI:1 CMCI:3
      CPU 38 MCA banks CMCI:0 CMCI:1 CMCI:3
      CPU 32 MCA banks CMCI:0 CMCI:1 CMCI:3
      CPU 37 MCA banks CMCI:0 CMCI:1 CMCI:3
      CPU 36 MCA banks CMCI:0 CMCI:1 CMCI:3
      CPU 34 MCA banks CMCI:0 CMCI:1 CMCI:3
      
      The value of these messages seems very low. A user might painstakingly
      cross-check against the data sheet for a processor to ensure that all
      CMCI supported banks are correctly reported, but this seems improbable.
      If users really wanted to do this, we should print the information at
      boot time too.
      
      Remove the messages.
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      4670a300
  19. 09 8月, 2012 1 次提交
  20. 07 8月, 2012 4 次提交
  21. 04 8月, 2012 4 次提交