]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - arch/x86/kernel/setup.c
x86/mm/64: Initialize CR4.PCIDE early
[mirror_ubuntu-jammy-kernel.git] / arch / x86 / kernel / setup.c
index d84afb0a322dd8515fb91424eef6cc42fcbfaee2..0957dd73d127554803f35d5be45dcddb845ca741 100644 (file)
@@ -1178,8 +1178,11 @@ void __init setup_arch(char **cmdline_p)
         * with the current CR4 value.  This may not be necessary, but
         * auditing all the early-boot CR4 manipulation would be needed to
         * rule it out.
+        *
+        * Mask off features that don't work outside long mode (just
+        * PCIDE for now).
         */
-       mmu_cr4_features = __read_cr4();
+       mmu_cr4_features = __read_cr4() & ~X86_CR4_PCIDE;
 
        memblock_set_current_limit(get_max_mapped());