17 Dec, 2009

1 commit

  • Randy Dunlap reported the following build error:

    "When CONFIG_SMP=n, CONFIG_X86_MSR=m:

    ERROR: "msrs_free" [drivers/edac/amd64_edac_mod.ko] undefined!
    ERROR: "msrs_alloc" [drivers/edac/amd64_edac_mod.ko] undefined!"

    This is due to the fact that is conditioned on
    CONFIG_SMP and in the UP case we have only the stubs in the header.
    Fork off SMP functionality into a new file (msr-smp.c) and build
    msrs_{alloc,free} unconditionally.

    Reported-by: Randy Dunlap
    Cc: H. Peter Anvin
    Signed-off-by: Borislav Petkov
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Borislav Petkov
     

12 Dec, 2009

1 commit

  • The current rd/wrmsr_on_cpus helpers assume that the supplied
    cpumasks are contiguous. However, there are machines out there
    like some K8 multinode Opterons which have a non-contiguous core
    enumeration on each node (e.g. cores 0,2 on node 0 instead of 0,1), see
    http://www.gossamer-threads.com/lists/linux/kernel/1160268.

    This patch fixes out-of-bounds writes (see URL above) by adding per-CPU
    msr structs which are used on the respective cores.

    Additionally, two helpers, msrs_{alloc,free}, are provided for use by
    the callers of the MSR accessors.

    Cc: H. Peter Anvin
    Cc: Mauro Carvalho Chehab
    Cc: Aristeu Rozanski
    Cc: Randy Dunlap
    Cc: Doug Thompson
    Signed-off-by: Borislav Petkov
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Borislav Petkov
     

15 Sep, 2009

1 commit

  • Since rdmsr_on_cpus and wrmsr_on_cpus are almost identical, unify them
    into a common __rwmsr_on_cpus helper thus avoiding code duplication.

    While at it, convert cpumask_t's to const struct cpumask *.

    Signed-off-by: Borislav Petkov
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     

01 Sep, 2009

1 commit


04 Aug, 2009

1 commit


10 Jun, 2009

2 commits

  • Provide for concurrent MSR writes on all the CPUs in the cpumask. Also,
    add a temporary workaround for smp_call_function_many which skips the
    CPU we're executing on.

    Bart: zero out rv struct which is allocated on stack.

    CC: H. Peter Anvin
    Signed-off-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Borislav Petkov
     
  • Add a struct representing a 64bit MSR pair consisting of a low and high
    register part and convert msr_info to use it. Also, rename msr-on-cpu.c
    to msr.c.

    Side note: Put the cpumask.h include in __KERNEL__ space thus fixing an
    allmodconfig build failure in the headers_check target.

    CC: H. Peter Anvin
    Signed-off-by: Borislav Petkov

    Borislav Petkov