All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@xensource.com>
To: Dave Pacheco <dap@cs.brown.edu>
Cc: Joel Weinberger <joel@cs.brown.edu>, xen-devel@lists.xensource.com
Subject: Re: Setting up page directories and tables
Date: Fri, 27 Apr 2007 18:14:29 -0700	[thread overview]
Message-ID: <46329FF5.5060504@xensource.com> (raw)
In-Reply-To: <2d88d46a0704271756t3968218h9f992ff495a6d48c@mail.gmail.com>

Dave Pacheco wrote:
>
> /var/log/xen/xend.log doesn't say much useful, other than that the
> domain crashed. Is there a way to tell why a domain crashed (i.e.
> executing an illegal instruction, or triple fault, or something like
> that)?

If you compile Xen with debug mode turned on, and then you get useful
stuff on the console.  It's generally fairly cryptic, but enough to give
you some hints.  Also, you can use gdbserver-xen to poke around in your
domain so long as it has valid pagetables.  It's useful for stepping up
to your cr3 load and looking at the state of things.

I see from your description that you're pinning L1 pages.  That's
generally not how Xen linux kernels do it these days; they just pin the
whole pagetable from L2 down (in your non-PAE case).  Since pinning from
top-down is the same as loading cr3 from a validity-checking
perspective, it's useful to see if Xen likes your pagetables without
actually trashing them (if you load a bad cr3, you end up in limbo with
no useful pagetables, and Xen can't even print a useful stack backtrace
as it destroys your domain).

Also, remember that all pages in your new pagetable have to be mapped RO
in *all* other pagetables.  The easiest way to achieve that is to make
all pagetables share the same L1 pages in your "kernel" address space,
assuming you have such a thing.  Otherwise when you're allocating a new
page for a pagetable, you have to walk through all other pagetables and
be sure to update any mappings for that page to RO.

    J

  reply	other threads:[~2007-04-28  1:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-27 20:11 Setting up page directories and tables Dave Pacheco
2007-04-27 21:39 ` Keir Fraser
2007-04-28  0:56   ` Dave Pacheco
2007-04-28  1:14     ` Jeremy Fitzhardinge [this message]
2007-05-01 19:32       ` Dave Pacheco
2007-05-01 21:42         ` Jeremy Fitzhardinge
2007-05-02  0:41         ` Mark Williamson
2007-05-01 16:27 ` Mark Williamson

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=46329FF5.5060504@xensource.com \
    --to=jeremy@xensource.com \
    --cc=dap@cs.brown.edu \
    --cc=joel@cs.brown.edu \
    --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.