aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2015-06-04 12:55:10 -0400
committerIngo Molnar <mingo@kernel.org>2015-06-07 09:28:52 -0400
commit9cd25aac1f44f269de5ecea11f7d927f37f1d01c (patch)
tree00d865f9811556a50b0ece6d840d55ab08fb0ecf /arch/x86/xen
parent9dac6290945142e6b87d9f027edfee676dcfbfda (diff)
x86/mm/pat: Emulate PAT when it is disabled
In the case when PAT is disabled on the command line with "nopat" or when virtualization doesn't support PAT (correctly) - see 9d34cfdf4796 ("x86: Don't rely on VMWare emulating PAT MSR correctly"). we emulate it using the PWT and PCD cache attribute bits. Get rid of boot_pat_state while at it. Based on a conglomerate patch from Toshi Kani. Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Toshi Kani <toshi.kani@hp.com> Acked-by: Juergen Gross <jgross@suse.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Elliott@hp.com Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Luis R. Rodriguez <mcgrof@suse.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: arnd@arndb.de Cc: hch@lst.de Cc: hmh@hmh.eng.br Cc: konrad.wilk@oracle.com Cc: linux-mm <linux-mm@kvack.org> Cc: linux-nvdimm@lists.01.org Cc: stefan.bader@canonical.com Cc: yigal@plexistor.com Link: http://lkml.kernel.org/r/1433436928-31903-3-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/enlighten.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 46957ead3060..53233a9beea9 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1467,6 +1467,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
1467{ 1467{
1468 struct physdev_set_iopl set_iopl; 1468 struct physdev_set_iopl set_iopl;
1469 unsigned long initrd_start = 0; 1469 unsigned long initrd_start = 0;
1470 u64 pat;
1470 int rc; 1471 int rc;
1471 1472
1472 if (!xen_start_info) 1473 if (!xen_start_info)
@@ -1574,8 +1575,8 @@ asmlinkage __visible void __init xen_start_kernel(void)
1574 * Modify the cache mode translation tables to match Xen's PAT 1575 * Modify the cache mode translation tables to match Xen's PAT
1575 * configuration. 1576 * configuration.
1576 */ 1577 */
1577 1578 rdmsrl(MSR_IA32_CR_PAT, pat);
1578 pat_init_cache_modes(); 1579 pat_init_cache_modes(pat);
1579 1580
1580 /* keep using Xen gdt for now; no urgent need to change it */ 1581 /* keep using Xen gdt for now; no urgent need to change it */
1581 1582