OSDN Git Service

x86/speculation/l1tf: Drop the swap storage limit restriction when l1tf=off
[android-x86/kernel.git] / arch / x86 / kernel / cpu / bugs.c
index 03ebc0a..803234b 100644 (file)
@@ -775,7 +775,8 @@ static void __init l1tf_select_mitigation(void)
 #endif
 
        half_pa = (u64)l1tf_pfn_limit() << PAGE_SHIFT;
-       if (e820_any_mapped(half_pa, ULLONG_MAX - half_pa, E820_RAM)) {
+       if (l1tf_mitigation != L1TF_MITIGATION_OFF &&
+                       e820_any_mapped(half_pa, ULLONG_MAX - half_pa, E820_RAM)) {
                pr_warn("System has more than MAX_PA/2 memory. L1TF mitigation not effective.\n");
                pr_info("You may make it effective by booting the kernel with mem=%llu parameter.\n",
                                half_pa);