From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH RESEND] xen: mask _PAGE_PCD from ptes
Date: Thu, 15 Nov 2007 13:49:16 -0800 [thread overview]
Message-ID: <473CBEDC.8020901@goop.org> (raw)
_PAGE_PCD maps a page with caching disabled, which is typically used
for mapping harware registers. Xen never allows it to be set on a
mapping, and unprivileged guests never need it since they can't see
the real underlying hardware. However, some uncached mappings are
made early when probing the (non-existent) APIC, and its OK to mask
off the PCD flag in these cases.
This became necessary because Xen started checking for this bit, rather
than silently masking it off.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
---
arch/x86/xen/mmu.c | 4 ++++
1 file changed, 4 insertions(+)
===================================================================
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -244,6 +244,8 @@ pte_t xen_make_pte(unsigned long long pt
if (pte & 1)
pte = phys_to_machine(XPADDR(pte)).maddr;
+ pte &= ~_PAGE_PCD;
+
return (pte_t){ pte, pte >> 32 };
}
@@ -290,6 +292,8 @@ pte_t xen_make_pte(unsigned long pte)
{
if (pte & _PAGE_PRESENT)
pte = phys_to_machine(XPADDR(pte)).maddr;
+
+ pte &= ~_PAGE_PCD;
return (pte_t){ pte };
}
reply other threads:[~2007-11-15 21:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=473CBEDC.8020901@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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