]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/x86/include/asm/processor.h
x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+
[linux.git] / arch / x86 / include / asm / processor.h
index 682286aca88141c5ec5315597020f6e7e0c9b0fc..d53c54b842daca1c847d8076aadd89564b23cf00 100644 (file)
@@ -132,6 +132,8 @@ struct cpuinfo_x86 {
        /* Index into per_cpu list: */
        u16                     cpu_index;
        u32                     microcode;
+       /* Address space bits used by the cache internally */
+       u8                      x86_cache_bits;
        unsigned                initialized : 1;
 } __randomize_layout;
 
@@ -181,9 +183,9 @@ extern const struct seq_operations cpuinfo_op;
 
 extern void cpu_detect(struct cpuinfo_x86 *c);
 
-static inline unsigned long l1tf_pfn_limit(void)
+static inline unsigned long long l1tf_pfn_limit(void)
 {
-       return BIT(boot_cpu_data.x86_phys_bits - 1 - PAGE_SHIFT) - 1;
+       return BIT_ULL(boot_cpu_data.x86_cache_bits - 1 - PAGE_SHIFT);
 }
 
 extern void early_cpu_init(void);