All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] x86: Full support of PAT
@ 2014-08-19 13:25 jgross
  2014-08-19 13:25 ` [PATCH RFC 1/3] x86: Make page cache mode a real type jgross
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: jgross @ 2014-08-19 13:25 UTC (permalink / raw)
  To: stefan.bader, toshi.kani, linux-kernel, xen-devel, konrad.wilk,
	ville.syrjala, hpa, x86

The x86 architecture offers via the PAT (Page Attribute Table) a way to
specify different caching modes in page table entries. The PAT MSR contains
8 entries each specifying one of 6 possible cache modes. A pte references one
of those entries via 3 bits: _PAGE_PAT, _PAGE_PWT and _PAGE_PCD.

The Linux kernel currently supports only 4 different cache modes. The PAT MSR
is set up in a way that the setting of _PAGE_PAT in a pte doesn't matter: the
top 4 entries in the PAT MSR are the same as the 4 lower entries.

This results in the kernel not supporting e.g. write-through mode. Especially
this cache mode would speed up drivers of video cards which now have to use
uncached accesses.

OTOH some old processors (Pentium) don't support PAT and the Xen hypervisor
has been using a different PAT MSR configuration for some time now and can't
change that as this setting is part of the ABI.

This patch set abstracts the cache mode from the pte and introduces tables to
translate between cache mode and pte bits (the default cache mode "write back"
is hard-wired to PAT entry 0). The tables are statically initialized with
values being compatible to old processors and current usage. As soon as the
PAT MSR is changed (or - in case of Xen - is read at boot time) the tables are
changed accordingly. Requests of mappings with special cache modes are always
possible now, in case they are not supported there will be a fallback to a
compatible but slower mode.

[PATCH RFC 1/3] x86: Make page cache mode a real type
[PATCH RFC 2/3] x86: Enable PAT to use cache mode translation tables
[PATCH RFC 3/3] Support Xen pv-domains using PAT

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

end of thread, other threads:[~2014-08-25 12:22 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-19 13:25 [PATCH RFC 0/3] x86: Full support of PAT jgross
2014-08-19 13:25 ` [PATCH RFC 1/3] x86: Make page cache mode a real type jgross
2014-08-20 19:26   ` Toshi Kani
2014-08-21  9:30     ` [Xen-devel] " Juergen Gross
2014-08-22  9:24       ` Jan Beulich
2014-08-22  9:24         ` Jan Beulich
2014-08-22 17:43         ` Toshi Kani
2014-08-21 22:09   ` Toshi Kani
2014-08-22  5:25     ` Juergen Gross
2014-08-19 13:25 ` [PATCH RFC 2/3] x86: Enable PAT to use cache mode translation tables jgross
2014-08-22  9:32   ` Jan Beulich
2014-08-22  9:32   ` [Xen-devel] " Jan Beulich
2014-08-25 12:22     ` Juergen Gross
2014-08-25 12:22     ` [Xen-devel] " Juergen Gross
2014-08-19 13:25 ` [PATCH RFC 3/3] Support Xen pv-domains using PAT jgross
2014-08-20 12:05 ` [PATCH RFC 0/3] x86: Full support of PAT One Thousand Gnomes
2014-08-20 12:05   ` One Thousand Gnomes
2014-08-20 12:21   ` [Xen-devel] " Jan Beulich
2014-08-20 12:21     ` Jan Beulich
2014-08-20 22:00     ` [Xen-devel] " H. Peter Anvin
2014-08-20 12:35   ` Juergen Gross
2014-08-20 21:59   ` H. Peter Anvin

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.