LKML Archive on
help / color / mirror / Atom feed
From: "Ahmed S. Darwish" <>
To: Rusty Russel <>,
	Suresh Siddha <>,
	Ingo Molnar <>, Thomas Gleixner <>
Subject: [Lguest/x86]: Clash with ioremap_nocache() + _PAGE_PWT
Date: Thu, 7 Feb 2008 01:21:34 +0200	[thread overview]
Message-ID: <20080206232134.GB6450@ubuntu> (raw)

Hi all,

Beginning from commit 4138cc3418f5, ioremap_nocache() sets the _PAGE_PWT

Lguest doesn't accept a guest pte with a _PWT flag and reports a
"bad page table entry" in that case. 

I've removed check from lguest code and everything worked fine. 
Is this safe from the Lguest side ?

Mentioned commit [*]:

commit 4138cc3418f5eaa7524ff8e927102863f1ba0ea5
Author: Siddha, Suresh B <>
Date:   Wed Jan 30 13:33:43 2008 +0100

    x86: set strong uncacheable where UC is really desired
    Also use _PAGE_PWT for all the mappings which need uncache mapping.
    Instead of existing PAT2 which is UC- (and can be overwritten by MTRRs),
    we now use PAT3 which is strong uncacheable.
    This makes it consistent with pgprot_noncached()

diff --git a/arch/x86/mm/ioremap_32.c b/arch/x86/mm/ioremap_32.c
index 0b27831..ef0f6a4 100644
--- a/arch/x86/mm/ioremap_32.c
+++ b/arch/x86/mm/ioremap_32.c
@@ -119,7 +119,7 @@ EXPORT_SYMBOL(__ioremap);
 void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 	unsigned long last_addr;
-	void __iomem *p = __ioremap(phys_addr, size, _PAGE_PCD);
+	void __iomem *p = __ioremap(phys_addr, size, _PAGE_PCD | _PAGE_PWT);
 	if (!p) 
 		return p; 


[*]: latest pull calls set_memory_uc() which also sets the _PWT flag.

Ahmed S. Darwish

             reply	other threads:[~2008-02-06 23:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06 23:21 Ahmed S. Darwish [this message]
2008-02-06 23:59 ` Ingo Molnar
2008-02-07  0:51   ` [PATCH] lguest: Accept guest _PAGE_PWT page table entries Ahmed S. Darwish
2008-02-07  1:00     ` Ingo Molnar
2008-03-04  1:37     ` Rusty Russell

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:

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

  git send-email \
    --in-reply-to=20080206232134.GB6450@ubuntu \ \ \ \ \ \ \ \
    --subject='Re: [Lguest/x86]: Clash with ioremap_nocache() + _PAGE_PWT' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).