public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: Juergen Gross <jgross@suse.com>,
	stefan.bader@canonical.com, toshi.kani@hp.com,
	linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com,
	konrad.wilk@oracle.com, ville.syrjala@linux.intel.com,
	hpa@zytor.com, x86@kernel.org
Subject: Re: [PATCH 0/3] x86: Full support of PAT
Date: Tue, 26 Aug 2014 11:48:42 -0700	[thread overview]
Message-ID: <53FCD68A.40509@amacapital.net> (raw)
In-Reply-To: <1409033783-12136-1-git-send-email-jgross@suse.com>

On 08/25/2014 11:16 PM, Juergen Gross wrote:
> 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 correctly 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.

I feel like I'm missing something here.  Where's the support for the
high PAT bit on huge pages?  Once you start using the top four entries,
you'll need that.

Also, this probably needs errata handling.  IIRC there are a handful of
CPUs that support PAT but don't work correctly if the high bit is set.

--Andy

  parent reply	other threads:[~2014-08-26 18:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26  6:16 [PATCH 0/3] x86: Full support of PAT Juergen Gross
2014-08-26  6:16 ` [PATCH 1/3] x86: Make page cache mode a real type Juergen Gross
2014-08-26 19:44   ` Toshi Kani
2014-08-27  4:07     ` [Xen-devel] " Juergen Gross
2014-08-26  6:16 ` [PATCH 2/3] x86: Enable PAT to use cache mode translation tables Juergen Gross
2014-08-26 19:45   ` Toshi Kani
2014-08-28 23:21   ` Toshi Kani
2014-08-29  4:08     ` Juergen Gross
2014-08-26  6:16 ` [PATCH 3/3] Support Xen pv-domains using PAT Juergen Gross
2014-08-26 10:59   ` [Xen-devel] " David Vrabel
2014-08-26 12:54     ` Juergen Gross
2014-08-26 18:48 ` Andy Lutomirski [this message]
2014-08-26 20:08   ` [PATCH 0/3] x86: Full support of PAT Toshi Kani
2014-08-26 20:23     ` Andy Lutomirski
  -- strict thread matches above, loose matches on Subject: below --
2014-08-26  6:15 Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53FCD68A.40509@amacapital.net \
    --to=luto@amacapital.net \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan.bader@canonical.com \
    --cc=toshi.kani@hp.com \
    --cc=ville.syrjala@linux.intel.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox