x86 leftover fixes for v3.14
Linus,
Please pull the latest x86-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus
# HEAD: da6139e49c7cb0f4251265cb5243b8d220adb48d x86: Add check for number of available vectors before CPU down
Two leftover fixes that did not make it into v3.13.
Thanks,
Ingo
------------------>
Borislav Petkov (1):
x86, cpu, amd: Add workaround for family 16h, erratum 793
Prarit Bhargava (1):
x86: Add check for number of available vectors before CPU down
arch/x86/include/asm/irq.h | 1 + arch/x86/include/uapi/asm/msr-index.h | 1 + arch/x86/kernel/cpu/amd.c | 10 +++++ arch/x86/kernel/irq.c | 70 +++++++++++++++++++++++++++++++++++ arch/x86/kernel/smpboot.c | 6 +++ 5 files changed, 88 insertions(+)
arch/x86/include/asm/irq.h +1 -0
@@ -25,6 +25,7 @@ extern void irq_ctx_init(int cpu);#ifdef CONFIG_HOTPLUG_CPU #include <linux/cpumask.h> +extern int check_irq_vectors_for_cpu_disable (void );extern void fixup_irqs (void );extern void irq_force_complete_move (int );#endif
arch/x86/include/uapi/asm/msr-index.h +1 -0
@@ -184,6 +184,7 @@#define MSR_AMD64_PATCH_LOADER 0xc0010020#define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140#define MSR_AMD64_OSVW_STATUS 0xc0010141 +#define MSR_AMD64_LS_CFG 0xc0011020#define MSR_AMD64_DC_CFG 0xc0011022#define MSR_AMD64_BU_CFG2 0xc001102a#define MSR_AMD64_IBSFETCHCTL 0xc0011030
arch/x86/kernel/cpu/amd.c +10 -0
@@ -508,6 +508,16 @@ static void early_init_amd(struct cpuinfo_x86 *c) set_cpu_cap(c, X86_FEATURE_EXTD_APICID); }#endif + +/* F16h erratum 793, CVE-2013-6885 */ +if (c->x86 ==0x16 && c->x86_model <=0xf ) { +u64 val; + +rdmsrl (MSR_AMD64_LS_CFG , val); +if (!(val &BIT (15 ))) +wrmsrl (MSR_AMD64_LS_CFG , val |BIT (15 )); + } + }static const int amd_erratum_383[];
arch/x86/kernel/irq.c +70 -0
76 lines not on this page · raw message
arch/x86/kernel/smpboot.c +6 -0
@@ -1312,6 +1312,12 @@ void cpu_disable_common(void)int native_cpu_disable (void ) { +int ret; + + ret =check_irq_vectors_for_cpu_disable (); +if (ret) +return ret; +clear_local_APIC ();cpu_disable_common ();