x86/speculation/l1tf: Drop the swap storage limit restriction when l1tf=off
[muen/linux.git] / arch / x86 / kernel / cpu / bugs.c
index a68b32cb845a4478286144578e811de85844fba9..58689ac64440d0657f87d76b93244b63e88cb723 100644 (file)
@@ -1002,7 +1002,8 @@ static void __init l1tf_select_mitigation(void)
 #endif
 
        half_pa = (u64)l1tf_pfn_limit() << PAGE_SHIFT;
-       if (e820__mapped_any(half_pa, ULLONG_MAX - half_pa, E820_TYPE_RAM)) {
+       if (l1tf_mitigation != L1TF_MITIGATION_OFF &&
+                       e820__mapped_any(half_pa, ULLONG_MAX - half_pa, E820_TYPE_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);