From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] mm: Fix Converting PTE to PFN
Date: Thu, 09 Oct 2008 16:04:06 +0900 [thread overview]
Message-ID: <48EDACE6.2080102@ab.jp.nec.com> (raw)
On x86_64 system, (pte >> PAGE_SHIFT) is not always equal to page frame
number because high bits (63:52) of pte may be used as flags. This patch
corrects the conversion and errors as below disappear when applied.
(XEN) mm.c:3074:d0 PTE entry 200000a2ec6167 for address a1f09958
doesn't match frame a2ec6
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
diff -r e66cecb66b1e xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Oct 08 14:00:58 2008 +0100
+++ b/xen/arch/x86/mm.c Thu Oct 09 14:14:13 2008 +0900
@@ -3067,7 +3067,7 @@ static int destroy_grant_pte_mapping(
ol1e = *(l1_pgentry_t *)va;
/* Check that the virtual address supplied is actually mapped to
frame. */
- if ( unlikely((l1e_get_intpte(ol1e) >> PAGE_SHIFT) != frame) )
+ if ( unlikely(l1e_get_pfn(ol1e) != frame) )
{
page_unlock(page);
MEM_LOG("PTE entry %lx for address %"PRIx64" doesn't match
frame %lx",
reply other threads:[~2008-10-09 7:04 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=48EDACE6.2080102@ab.jp.nec.com \
--to=y-iwamatsu@ab.jp.nec.com \
--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 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.