All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Refactor MTRR and PAT initializations
@ 2016-03-11  4:45 Toshi Kani
  2016-03-11  4:45 ` [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani
  2016-03-11  4:45 ` [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani
  0 siblings, 2 replies; 57+ messages in thread
From: Toshi Kani @ 2016-03-11  4:45 UTC (permalink / raw)
  To: mingo, bp, hpa, tglx; +Cc: mcgrof, jgross, paul.gortmaker, x86, linux-kernel

Since 'commit 9cd25aac1f44 ("x86/mm/pat: Emulate PAT when it
is disabled")', we emulate a PAT table when PAT is disabled.
This requires pat_init() be called even if PAT is disabled,
which revealed a long standing issue that PAT is left enabled
without calling pat_init() at all.

pat_init() is called from MTRR code since it relies on MTRR's
rendezvous handler to initialize PAT for all APs .  However,
when CPU does not support MTRR, ex. qemu32's virtual CPU, MTRR
is set disabled and does not call pat_init().  There is no
interface available for MTRR to disable PAT, either.

This patch-set refactors MTRR and PAT initializations to make
sure that PAT is properly initialized in all cases.

---
Toshi Kani (2):
 1/2 x86/mm/pat: Change pat_disable() to emulate PAT table
 2/2 x86/mtrr: Refactor PAT initialization code 

---
 arch/x86/include/asm/mtrr.h        |  6 ++-
 arch/x86/include/asm/pat.h         |  1 +
 arch/x86/kernel/cpu/mtrr/generic.c | 24 ++++++-----
 arch/x86/kernel/cpu/mtrr/main.c    | 13 +++++-
 arch/x86/kernel/cpu/mtrr/mtrr.h    |  1 +
 arch/x86/mm/pat.c                  | 84 +++++++++++++++++++++++---------------
 6 files changed, 84 insertions(+), 45 deletions(-)

^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2016-04-11 14:38 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11  4:45 [PATCH 0/2] Refactor MTRR and PAT initializations Toshi Kani
2016-03-11  4:45 ` [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani
2016-03-11  9:12   ` Borislav Petkov
2016-03-11 16:27     ` Toshi Kani
2016-03-11 15:54       ` Borislav Petkov
2016-03-11 19:28         ` Toshi Kani
2016-03-12 11:55           ` Borislav Petkov
2016-03-14 21:37             ` Toshi Kani
2016-03-15 11:00               ` Borislav Petkov
2016-03-15 22:02                 ` Toshi Kani
2016-03-15  0:29             ` Luis R. Rodriguez
2016-03-15  3:11               ` Toshi Kani
2016-03-15  3:11               ` Toshi Kani
2016-03-15 11:01                 ` Borislav Petkov
2016-03-15 15:43                   ` Toshi Kani
2016-03-15 15:43                   ` Toshi Kani
2016-03-15 15:47                     ` Borislav Petkov
2016-03-15 15:47                     ` Borislav Petkov
2016-03-15 17:11                       ` Toshi Kani
2016-03-15 16:33                         ` Borislav Petkov
2016-03-15 16:33                         ` Borislav Petkov
2016-03-15 17:11                       ` Toshi Kani
2016-03-15 11:01                 ` Borislav Petkov
2016-03-15 21:31                 ` Luis R. Rodriguez
2016-03-15 21:31                 ` Luis R. Rodriguez
2016-03-15  0:29             ` Luis R. Rodriguez
2016-03-11  4:45 ` [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani
2016-03-11  9:01   ` Ingo Molnar
2016-03-11  9:13     ` Ingo Molnar
2016-03-11 18:34       ` Toshi Kani
2016-03-12 16:18         ` Ingo Molnar
2016-03-14 19:47           ` Toshi Kani
2016-03-14 22:50         ` Luis R. Rodriguez
2016-03-15  0:37           ` Toshi Kani
2016-03-15 15:56             ` Borislav Petkov
2016-03-16 15:44             ` Joe Lawrence
2016-03-11  9:24   ` Borislav Petkov
2016-03-11 18:57     ` Toshi Kani
2016-03-11 22:17       ` Luis R. Rodriguez
2016-03-11 23:56         ` Toshi Kani
2016-03-11 23:34           ` Luis R. Rodriguez
2016-03-12  1:16             ` Toshi Kani
2016-03-15  0:15               ` Luis R. Rodriguez
2016-03-15 23:48                 ` Toshi Kani
2016-03-15 23:29                   ` Luis R. Rodriguez
2016-03-17 21:56                     ` Toshi Kani
2016-03-18  0:06                       ` Luis R. Rodriguez
2016-03-18 21:35                         ` Toshi Kani
2016-03-29 17:14                           ` Luis R. Rodriguez
2016-03-29 21:46                             ` Toshi Kani
2016-03-29 22:12                               ` Luis R. Rodriguez
2016-03-30  0:16                                 ` Toshi Kani
2016-03-29 23:43                                   ` Luis R. Rodriguez
2016-03-30  1:07                                     ` Toshi Kani
2016-03-30  0:34                                       ` Luis R. Rodriguez
2016-04-09  2:04                       ` Luis R. Rodriguez
2016-04-11 14:30                         ` Toshi Kani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.