[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Setting up page directories and tables



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.