All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] Enhance PAT init to fix Xorg crashes
@ 2016-03-23 21:41 Toshi Kani
  2016-03-23 21:41 ` [PATCH v3 1/7] x86/mm/pat: Add support of non-default PAT MSR setting Toshi Kani
                   ` (12 more replies)
  0 siblings, 13 replies; 43+ messages in thread
From: Toshi Kani @ 2016-03-23 21:41 UTC (permalink / raw)
  To: mingo, bp, hpa, tglx
  Cc: mcgrof, jgross, paul.gortmaker, konrad.wilk, elliott, x86,
	xen-devel, linux-kernel

A Xorg failure on qemu32 was reported as a regression [1] caused by
'commit 9cd25aac1f44 ("x86/mm/pat: Emulate PAT when it is disabled")'.
This patch-set fixes the regression.

Negative effects of this regression were two failures [2] in Xorg on
QEMU with QEMU CPU model "qemu32" (-cpu qemu32), which were triggered
by the fact that its virtual CPU does not support MTRR.
 #1. copy_process() failed in the check in reserve_pfn_range()
 #2. error path in copy_process() then hit WARN_ON_ONCE in
     untrack_pfn().

These negative effects are caused by two separate bugs, but they can be
addressed in separate patches.  This patch-set addresses the root cause,
a long-standing PAT initialization issue.

Please see the changelog in patch 4/7 for the details of the issue.

- Patch 1-2 make necessary enhancement to PAT for the fix without
  breaking Xen.
- Patch 3 is cleanup.
- Patch 4 fixes the regression.
- Patch 5 fixes an MTRR issue related with PAT init.
- Patch 6 removes PAT init code from Xen.
- Patch 7 adds PAT init to documentation.

[1]: https://lkml.org/lkml/2016/3/3/828
[2]: https://lkml.org/lkml/2016/3/4/775

I'd appreciate if someone can test this patch-set on Xen to verify that
there is no change in "x86/PAT: Configuration [0-7] .." message in dmesg.

---
v3:
 - Change a new func name to init_cache_modes(). (Borislav Petkov)
 - Add check with __pat_enabled, and use WARN_ONCE() for a bug check
   in pat_disable(). (Borislav Petkov)
 - Update changelog, comments, and doc per review. (Borislav Petkov)

v2:
 - Divide patch-set into a single change. (Borislav Petkov)
 - Xen's case must be handled properly. (Luis R. Rodriguez)
 - Change changelog and title to describe the issue. (Ingo Molnar)
 - Update an error message. (Robert Elliott, Borislav Petkov)

---
Toshi Kani (7):
 1/7 x86/mm/pat: Add support of non-default PAT MSR setting
 2/7 x86/mm/pat: Add pat_disable() interface
 3/7 x86/mm/pat: Replace cpu_has_pat with boot_cpu_has
 4/7 x86/mtrr: Fix Xorg crashes in Qemu sessions
 5/7 x86/mtrr: Fix PAT init handling when MTRR is disabled
 6/7 x86/xen,pat: Remove PAT table init code from Xen
 7/7 x86/pat: Document PAT initialization

---
 Documentation/x86/pat.txt          | 32 ++++++++++++++
 arch/x86/include/asm/mtrr.h        |  6 ++-
 arch/x86/include/asm/pat.h         |  2 +-
 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                  | 90 ++++++++++++++++++++++++++++----------
 arch/x86/xen/enlighten.c           |  9 ----
 8 files changed, 132 insertions(+), 45 deletions(-)

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

end of thread, other threads:[~2016-03-30 20:47 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-23 21:41 [PATCH v3 0/7] Enhance PAT init to fix Xorg crashes Toshi Kani
2016-03-23 21:41 ` [PATCH v3 1/7] x86/mm/pat: Add support of non-default PAT MSR setting Toshi Kani
2016-03-29 10:37   ` [tip:x86/mm] " tip-bot for Toshi Kani
2016-03-23 21:41 ` [PATCH v3 1/7] " Toshi Kani
2016-03-23 21:41 ` [PATCH v3 2/7] x86/mm/pat: Add pat_disable() interface Toshi Kani
2016-03-23 21:41   ` Toshi Kani
2016-03-29 10:38   ` [tip:x86/mm] " tip-bot for Toshi Kani
2016-03-23 21:41 ` [PATCH v3 3/7] x86/mm/pat: Replace cpu_has_pat with boot_cpu_has Toshi Kani
2016-03-29 10:38   ` [tip:x86/mm] x86/mm/pat: Replace cpu_has_pat with boot_cpu_has() tip-bot for Toshi Kani
2016-03-23 21:41 ` [PATCH v3 3/7] x86/mm/pat: Replace cpu_has_pat with boot_cpu_has Toshi Kani
2016-03-23 21:42 ` [PATCH v3 4/6] x86/mtrr: Fix Xorg crashes in Qemu sessions Toshi Kani
2016-03-23 21:42   ` Toshi Kani
2016-03-29 10:39   ` [tip:x86/mm] " tip-bot for Toshi Kani
2016-03-23 21:42 ` [PATCH v3 5/7] x86/mtrr: Fix PAT init handling when MTRR is disabled Toshi Kani
2016-03-29 10:39   ` [tip:x86/mm] " tip-bot for Toshi Kani
2016-03-23 21:42 ` [PATCH v3 5/7] " Toshi Kani
2016-03-23 21:42 ` [PATCH v3 6/7] x86/xen,pat: Remove PAT table init code from Xen Toshi Kani
2016-03-23 21:42   ` [PATCH v3 6/7] x86/xen, pat: " Toshi Kani
2016-03-29 10:39   ` [tip:x86/mm] " tip-bot for Toshi Kani
2016-03-23 21:42 ` [PATCH v3 7/7] x86/pat: Document PAT initialization Toshi Kani
2016-03-23 21:42 ` Toshi Kani
2016-03-29 10:40   ` [tip:x86/mm] x86/pat: Document the PAT initialization sequence tip-bot for Toshi Kani
2016-03-29 10:34 ` [PATCH v3 0/7] Enhance PAT init to fix Xorg crashes Ingo Molnar
2016-03-29 14:19   ` Toshi Kani
2016-03-29 14:19   ` Toshi Kani
2016-03-29 14:46     ` Boris Ostrovsky
2016-03-29 14:46     ` [Xen-devel] " Boris Ostrovsky
2016-03-29 15:49       ` Toshi Kani
2016-03-29 15:49       ` [Xen-devel] " Toshi Kani
2016-03-30 18:02         ` Luis R. Rodriguez
2016-03-30 18:02           ` Luis R. Rodriguez
2016-03-30 18:58           ` Konrad Rzeszutek Wilk
2016-03-30 18:58             ` [Xen-devel] " Konrad Rzeszutek Wilk
2016-03-30 20:10             ` [LKP] " Luis R. Rodriguez
2016-03-30 20:10             ` [LKP] [Xen-devel] " Luis R. Rodriguez
2016-03-30 20:10               ` Luis R. Rodriguez
2016-03-30 20:29               ` [LKP] " Konrad Rzeszutek Wilk
2016-03-30 20:29                 ` [Xen-devel] " Konrad Rzeszutek Wilk
2016-03-30 20:47                 ` [LKP] " Luis R. Rodriguez
2016-03-30 20:47                 ` [LKP] [Xen-devel] " Luis R. Rodriguez
2016-03-30 20:47                   ` Luis R. Rodriguez
2016-03-30 18:02         ` Luis R. Rodriguez
2016-03-29 10:34 ` Ingo Molnar

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.