Merge tag 'stable/for-linus-3.19-rc4-tag' of git://git.kernel.org/pub/scm/linux/kerne...
[cascardo/linux.git] / arch / x86 / xen / enlighten.c
index 1150163..78a881b 100644 (file)
@@ -1102,12 +1102,6 @@ static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high)
                /* Fast syscall setup is all done in hypercalls, so
                   these are all ignored.  Stub them out here to stop
                   Xen console noise. */
-               break;
-
-       case MSR_IA32_CR_PAT:
-               if (smp_processor_id() == 0)
-                       xen_set_pat(((u64)high << 32) | low);
-               break;
 
        default:
                ret = native_write_msr_safe(msr, low, high);
@@ -1581,10 +1575,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
 
        /* Prevent unwanted bits from being set in PTEs. */
        __supported_pte_mask &= ~_PAGE_GLOBAL;
-#if 0
-       if (!xen_initial_domain())
-#endif
-               __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
 
        /*
         * Prevent page tables from being allocated in highmem, even
@@ -1637,14 +1627,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
         * be meaningless.  Prevent it from trying.
         */
        acpi_numa = -1;
-#endif
-#ifdef CONFIG_X86_PAT
-       /*
-        * For right now disable the PAT. We should remove this once
-        * git commit 8eaffa67b43e99ae581622c5133e20b0f48bcef1
-        * (xen/pat: Disable PAT support for now) is reverted.
-        */
-       pat_enabled = 0;
 #endif
        /* Don't do the full vcpu_info placement stuff until we have a
           possible map and a non-dummy shared_info. */
@@ -1656,6 +1638,13 @@ asmlinkage __visible void __init xen_start_kernel(void)
        xen_raw_console_write("mapping kernel into physical memory\n");
        xen_setup_kernel_pagetable((pgd_t *)xen_start_info->pt_base, xen_start_info->nr_pages);
 
+       /*
+        * Modify the cache mode translation tables to match Xen's PAT
+        * configuration.
+        */
+
+       pat_init_cache_modes();
+
        /* keep using Xen gdt for now; no urgent need to change it */
 
 #ifdef CONFIG_X86_32