x86/mm/pat: Emulate PAT when it is disabled
authorBorislav Petkov <[email protected]>
Thu, 4 Jun 2015 16:55:10 +0000 (18:55 +0200)
committerIngo Molnar <[email protected]>
Sun, 7 Jun 2015 13:28:52 +0000 (15:28 +0200)
commit9cd25aac1f44f269de5ecea11f7d927f37f1d01c
tree00d865f9811556a50b0ece6d840d55ab08fb0ecf
parent9dac6290945142e6b87d9f027edfee676dcfbfda
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 <[email protected]>
Reviewed-by: Toshi Kani <[email protected]>
Acked-by: Juergen Gross <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: [email protected]
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Luis R. Rodriguez <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: linux-mm <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/include/asm/pat.h
arch/x86/mm/init.c
arch/x86/mm/pat.c
arch/x86/xen/enlighten.c