xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "W. Michael Petullo" <mike@flyn.org>
To: xen-devel@lists.xensource.com
Subject: Question about MMUEXT_PIN_L3_TABLE
Date: Thu, 8 Jul 2010 05:57:40 -0500	[thread overview]
Message-ID: <20100708105739.GB2001@imp.local> (raw)

I am trying to port Ethos, a security research kernel, to Xen on
x86+PAE. Ethos currently works fine under Xen when PAE is disabled. My
problem has to do with setting up the page tables for the first user-mode
process when the processor is in PAE mode. 

The kernel sets up its page tables and then creates an L3 page directory
pointer table (one page) for the user process. Next, the kernel
copies its L3 entry into the user process L3 table (kernel memory
starts at 0xc0000000) and zeroes out the three other entries. The
kernel then tries to pin the table using HYPERVISOR_mmuext_op() /
MMUEXT_PIN_L3_TABLE. Pinning fails, with Xen logging the following:

(XEN) mm.c:1185:d13 PAE L3 slot is shared
(XEN) mm.c:1393:d13 Failure in alloc_l3_table: entry 4
(XEN) mm.c:2070:d13 Error while validating mfn 79f0a (pfn 4c2) for type 60000000: caf=80000003 taf=60000001
(XEN) mm.c:2700:d13 Error while pinning mfn 79f0a

I have not yet had any luck finding the cause of this. From what I
can tell, the kernel's page tables are valid. The kernel initializes
memory and performs many other initializations successfully before this
point. Does anyone have any suggestions?

-- 
Mike

:wq

             reply	other threads:[~2010-07-08 10:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08 10:57 W. Michael Petullo [this message]
2010-07-08 12:14 ` Question about MMUEXT_PIN_L3_TABLE Keir Fraser
2010-07-09 11:23   ` W. Michael Petullo
2010-07-09 11:40     ` Keir Fraser

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=20100708105739.GB2001@imp.local \
    --to=mike@flyn.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;
as well as URLs for NNTP newsgroup(s).