x86/mm/pat: Emulate PAT when it is disabled
[firefly-linux-kernel-4.4.55.git] / arch / x86 / xen / enlighten.c
index 46957ead3060eecb5e76b6f6daf3b498a6b6a5e9..53233a9beea91835ef4ce1385b45d19d1361c293 100644 (file)
@@ -1467,6 +1467,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
 {
        struct physdev_set_iopl set_iopl;
        unsigned long initrd_start = 0;
+       u64 pat;
        int rc;
 
        if (!xen_start_info)
@@ -1574,8 +1575,8 @@ asmlinkage __visible void __init xen_start_kernel(void)
         * Modify the cache mode translation tables to match Xen's PAT
         * configuration.
         */
-
-       pat_init_cache_modes();
+       rdmsrl(MSR_IA32_CR_PAT, pat);
+       pat_init_cache_modes(pat);
 
        /* keep using Xen gdt for now; no urgent need to change it */