summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorToshi Kani <toshi.kani@hpe.com>2016-03-23 15:41:57 -0600
committerIngo Molnar <mingo@kernel.org>2016-03-29 12:23:25 +0200
commit02f037d641dc6672be5cfe7875a48ab99b95b154 (patch)
tree606902997743c91bbb0886d3306ba7cc79f39d05 /kernel
parent1993b176a8224e371e0732ffada7ab9eb3b0912b (diff)
downloadlinux-stable-02f037d641dc6672be5cfe7875a48ab99b95b154.tar.gz
linux-stable-02f037d641dc6672be5cfe7875a48ab99b95b154.tar.bz2
linux-stable-02f037d641dc6672be5cfe7875a48ab99b95b154.zip
x86/mm/pat: Add support of non-default PAT MSR setting
In preparation for fixing a regression caused by: 9cd25aac1f44 ("x86/mm/pat: Emulate PAT when it is disabled")' ... PAT needs to support a case that PAT MSR is initialized with a non-default value. When pat_init() is called and PAT is disabled, it initializes the PAT table with the BIOS default value. Xen, however, sets PAT MSR with a non-default value to enable WC. This causes inconsistency between the PAT table and PAT MSR when PAT is set to disable on Xen. Change pat_init() to handle the PAT disable cases properly. Add init_cache_modes() to handle two cases when PAT is set to disable. 1. CPU supports PAT: Set PAT table to be consistent with PAT MSR. 2. CPU does not support PAT: Set PAT table to be consistent with PWT and PCD bits in a PTE. Note, __init_cache_modes(), renamed from pat_init_cache_modes(), will be changed to a static function in a later patch. Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Juergen Gross <jgross@suse.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Luis R. Rodriguez <mcgrof@suse.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Toshi Kani <toshi.kani@hp.com> Cc: elliott@hpe.com Cc: konrad.wilk@oracle.com Cc: paul.gortmaker@windriver.com Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1458769323-24491-2-git-send-email-toshi.kani@hpe.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions