mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@eu.citrix.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Yinghai Lu <yinghai@kernel.org>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	"Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>,
	Arjan van de Ven <arjan@infradead.org>,
	the arch/x86 maintainers <x86@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Xen-devel <xen-devel@lists.xensource.com>,
	Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
Subject: Re: [PATCH 06/16] xen: disable PAT
Date: Fri, 8 May 2009 13:38:31 +0100	[thread overview]
Message-ID: <1241786311.16804.56.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <20090508111432.GF11596@elte.hu>

On Fri, 2009-05-08 at 07:14 -0400, Ingo Molnar wrote:
> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> 
> > From: Ian Campbell <ian.campbell@citrix.com>
> > 
> > Impact: disable PAT under Xen
> > 
> > Xen imposes a particular PAT layout on all paravirtual guests which
> > does not match the layout Linux would like to use.
> > 
> > Force PAT to be disabled until this is resolved.
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
> 
> hm, what will the resolution be?

Roughly speaking the kernel needs to cope with different values written
to MSR_IA32_CR_PAT than the single hard coded value it would write
itself if given the chance. Essentially _PAGE_CACHE_* need to become
dynamic (or I guess we could change the native layout to match Xen's, I
don't know why native differs from the initial state, I guess just to
avoid using the PAT bit for some reason).

The various mappings used are:
	PAT PCD PWT	NATIVE	XEN	BIOS	INIT
        0   0   0	WB	WB	WB	WB
        0   0   1	WC	WT	WT	WT
        0   1   0	UC-	UC-	UC-	UC-
        0   1   1	UC	UC	-	UC
        1   0   0	-	WC	WB	WB
        1   0   1	-	WP	WT	WT
        1   1   0	-	-	UC-	UC-
        1   1   1	-	-	-	UC-
(INIT is the processors initial state and BIOS is apparently commonly
set by the BIOS).

At the time this changeset was originally written using the actual PAT
bit (required by Xen's layout to get at WC) led to strange errors (to do
with swap masking various bits IIRC) but I believe those have been fixed
since by Jan Beulich.

I'm not sure how _PAGE_PAT_LARGE fits in -- native cunning avoids having
to worry about it by not using the PAT bit at all.

Ian.



  reply	other threads:[~2009-05-08 12:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 21:10 [GIT PULL] xen: core dom0 support Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 01/16] xen dom0: Make hvc_xen console work for dom0 Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 02/16] xen dom0: Initialize xenbus " Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 03/16] xen dom0: Set up basic IO permissions " Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 04/16] xen dom0: Add support for the platform_ops hypercall Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 05/16] xen mtrr: Add mtrr_ops support for Xen mtrr Jeremy Fitzhardinge
2009-05-08 11:17   ` Ingo Molnar
2009-05-07 21:10 ` [PATCH 06/16] xen: disable PAT Jeremy Fitzhardinge
2009-05-08 11:14   ` Ingo Molnar
2009-05-08 12:38     ` Ian Campbell [this message]
2009-05-08 14:50       ` Alan Cox
2009-05-09  8:04         ` [Xen-devel] " Keir Fraser
2009-05-09 18:36           ` H. Peter Anvin
2009-05-10  9:21             ` Keir Fraser
2009-05-10 13:29               ` Alan Cox
2009-05-10 17:34                 ` Keir Fraser
2009-05-10 17:55                 ` H. Peter Anvin
2009-05-11 11:10                   ` Ingo Molnar
2009-05-07 21:10 ` [PATCH 07/16] xen/dom0: use _PAGE_IOMAP in ioremap to do machine mappings Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 08/16] xen/dom0: Use host E820 map Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 09/16] xen: implement XENMEM_machphys_mapping Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 10/16] xen: clear reserved bits in l3 entries given in the initial pagetables Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 11/16] xen: allow enable use of VGA console on dom0 Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 12/16] xen/dom0: add XEN_DOM0 config option Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 13/16] x86: make /dev/mem mappings _PAGE_IOMAP Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 14/16] paravirtualize IO permission bitmap Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 15/16] x86: don't need "changed" parameter for set_io_bitmap() Jeremy Fitzhardinge
2009-05-07 21:10 ` [PATCH 16/16] xen: checkpatch cleanups Jeremy Fitzhardinge
2009-05-12 21:28 [GIT PULL] xen dom0 core changes Jeremy Fitzhardinge
2009-05-12 21:28 ` [PATCH 06/16] xen: disable PAT Jeremy Fitzhardinge
2009-06-02 15:37   ` Thomas Gleixner
2009-06-03  6:33     ` Jeremy Fitzhardinge
2009-05-27  7:15 [GIT PULL REPOST] xen/dom0/core - core Xen dom0 support changes Jeremy Fitzhardinge
2009-05-27  7:15 ` [PATCH 06/16] xen: disable PAT Jeremy Fitzhardinge

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=1241786311.16804.56.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@eu.citrix.com \
    --cc=Jeremy.Fitzhardinge@citrix.com \
    --cc=arjan@infradead.org \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    --cc=yinghai@kernel.org \
    /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

all inboxes | Powered by JetHome®