projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a0d310
)
x86: Don't rely on VMWare emulating PAT MSR correctly
author
Juergen Gross
<
[email protected]
>
Mon, 12 Jan 2015 05:15:45 +0000
(06:15 +0100)
committer
Thomas Gleixner
<
[email protected]
>
Tue, 20 Jan 2015 13:33:45 +0000
(14:33 +0100)
VMWare seems not to emulate the PAT MSR correctly: reaeding
MSR_IA32_CR_PAT returns 0 even after writing another value to it.
Commit
bd809af16e3ab
triggers this VMWare bug when the kernel is
booted as a VMWare guest.
Detect this bug and don't use the read value if it is 0.
Fixes: bd809af16e3ab "x86: Enable PAT to use cache mode translation tables"
Reported-and-tested-by: Jongman Heo <
[email protected]
>
Acked-by: Alok N Kataria <
[email protected]
>
Signed-off-by: Juergen Gross <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Thomas Gleixner <
[email protected]
>
arch/x86/mm/pat.c
patch
|
blob
|
history
diff --git
a/arch/x86/mm/pat.c
b/arch/x86/mm/pat.c
index edf299c8ff6c774dea8116092a41b15102d9cf1c..7ac68698406c3b35e5ce0b0e98c73c5441e869a3 100644
(file)
--- a/
arch/x86/mm/pat.c
+++ b/
arch/x86/mm/pat.c
@@
-234,8
+234,13
@@
void pat_init(void)
PAT(4, WB) | PAT(5, WC) | PAT(6, UC_MINUS) | PAT(7, UC);
/* Boot CPU check */
- if (!boot_pat_state)
+ if (!boot_pat_state)
{
rdmsrl(MSR_IA32_CR_PAT, boot_pat_state);
+ if (!boot_pat_state) {
+ pat_disable("PAT read returns always zero, disabled.");
+ return;
+ }
+ }
wrmsrl(MSR_IA32_CR_PAT, pat);