diff options
| -rw-r--r-- | arch/x86/include/asm/barrier.h | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/bugs.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/include/asm/barrier.h b/arch/x86/include/asm/barrier.h index 042b5e892ed1..14de0432d288 100644 --- a/arch/x86/include/asm/barrier.h +++ b/arch/x86/include/asm/barrier.h | |||
| @@ -38,7 +38,7 @@ static inline unsigned long array_index_mask_nospec(unsigned long index, | |||
| 38 | { | 38 | { |
| 39 | unsigned long mask; | 39 | unsigned long mask; |
| 40 | 40 | ||
| 41 | asm ("cmp %1,%2; sbb %0,%0;" | 41 | asm volatile ("cmp %1,%2; sbb %0,%0;" |
| 42 | :"=r" (mask) | 42 | :"=r" (mask) |
| 43 | :"g"(size),"r" (index) | 43 | :"g"(size),"r" (index) |
| 44 | :"cc"); | 44 | :"cc"); |
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index cd0fda1fff6d..404df26b7de8 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
| 28 | #include <asm/set_memory.h> | 28 | #include <asm/set_memory.h> |
| 29 | #include <asm/intel-family.h> | 29 | #include <asm/intel-family.h> |
| 30 | #include <asm/hypervisor.h> | ||
| 30 | 31 | ||
| 31 | static void __init spectre_v2_select_mitigation(void); | 32 | static void __init spectre_v2_select_mitigation(void); |
| 32 | static void __init ssb_select_mitigation(void); | 33 | static void __init ssb_select_mitigation(void); |
| @@ -664,6 +665,9 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr | |||
| 664 | if (boot_cpu_has(X86_FEATURE_PTI)) | 665 | if (boot_cpu_has(X86_FEATURE_PTI)) |
| 665 | return sprintf(buf, "Mitigation: PTI\n"); | 666 | return sprintf(buf, "Mitigation: PTI\n"); |
| 666 | 667 | ||
| 668 | if (hypervisor_is_type(X86_HYPER_XEN_PV)) | ||
| 669 | return sprintf(buf, "Unknown (XEN PV detected, hypervisor mitigation required)\n"); | ||
| 670 | |||
| 667 | break; | 671 | break; |
| 668 | 672 | ||
| 669 | case X86_BUG_SPECTRE_V1: | 673 | case X86_BUG_SPECTRE_V1: |
