From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Jan Beulich <JBeulich@suse.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH 4 of 4] xen/pagetables: Document pt_base inconsistency when running in COMPAT mode
Date: Wed, 22 Aug 2012 10:06:49 -0400 [thread overview]
Message-ID: <20120822140649.GA31112@phenom.dumpdata.com> (raw)
In-Reply-To: <1345627270.6821.125.camel@zakaz.uk.xensource.com>
On Wed, Aug 22, 2012 at 10:21:10AM +0100, Ian Campbell wrote:
> On Tue, 2012-08-21 at 21:08 +0100, Konrad Rzeszutek Wilk wrote:
> > # HG changeset patch
> > # User Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > # Date 1345579709 14400
> > # Node ID b992f8e613a3401b9ddd140ce436c840d412beb7
> > # Parent 74bedb086c5b72447262e087c0218b89f8bc9140
> > xen/pagetables: Document pt_base inconsistency when running in COMPAT mode.
> >
> > c/s 13257 added the COMPAT mode wherein a 64-bit hypervisor can
> > run with a 32-bit initial domain. One of the things it added was
> > that the pt_base is offset by two pages. This inconsistency
> > is only present in the COMPAT mode so lets document it.
> >
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> >
> > diff -r 74bedb086c5b -r b992f8e613a3 xen/include/public/xen.h
> > --- a/xen/include/public/xen.h Tue Aug 21 16:08:29 2012 -0400
> > +++ b/xen/include/public/xen.h Tue Aug 21 16:08:29 2012 -0400
> > @@ -663,7 +663,7 @@ typedef struct shared_info shared_info_t
> > * c. list of allocated page frames [mfn_list, nr_pages]
> > * (unless relocated due to XEN_ELFNOTE_INIT_P2M)
> > * d. start_info_t structure [register ESI (x86)]
> > - * e. bootstrap page tables [pt_base, CR3 (x86)]
> > + * e. bootstrap page tables [pt_base, CR3 (x86)] *1
> > * f. bootstrap stack [register ESP (x86)]
> > * 4. Bootstrap elements are packed together, but each is 4kB-aligned.
> > * 5. The initial ram disk may be omitted.
> > @@ -678,6 +678,9 @@ typedef struct shared_info shared_info_t
> > *
> > * NOTE: The initial virtual region (3a -> 3f) are all mapped by the initial
> > * pagetables [pt_base, CR3 (x86)].
> > + *
> > + * *1: When booting under a 64-bit hypervisor with a 32-bit initial domain
> > + * it is offset by two pages (pt_base += PAGE_SIZE*2).
>
> "it" here being the page which you would have to load into cr3?
No. The pt_base value.
>
> What, if anything, ends up in the other two pages?
The L3 and L1. The pt_base has incorrect data and points to second L1 instead
of the L3.
Its laid out like this: [L3] [L1] [L1] ... [L2]
a b c
and pt_base has the phys_addr of 'c' instead of 'a'.
next prev parent reply other threads:[~2012-08-22 14:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 20:08 [PATCH 0 of 4] [RFC PATCH] Various docs and inthe field help patches Konrad Rzeszutek Wilk
2012-08-21 20:08 ` [PATCH 1 of 4] xen/vga: Add 'vga_delay' parameter to delay screen output by X miliseconds per line Konrad Rzeszutek Wilk
2012-08-21 20:08 ` [PATCH 2 of 4] get_page_type: Print out extra information when failing to get page_type Konrad Rzeszutek Wilk
2012-08-22 8:04 ` Jan Beulich
2012-08-22 14:14 ` Jan Beulich
2012-08-22 14:24 ` Konrad Rzeszutek Wilk
2012-08-22 14:51 ` Jan Beulich
2012-08-21 20:08 ` [PATCH 3 of 4] xen/pagetables: Document that all of the initial regions are mapped Konrad Rzeszutek Wilk
2012-08-22 14:17 ` Jan Beulich
2012-08-22 14:27 ` Konrad Rzeszutek Wilk
2012-08-22 15:24 ` Stefano Stabellini
2012-08-22 15:35 ` Jan Beulich
2012-08-22 16:15 ` Konrad Rzeszutek Wilk
2012-08-21 20:08 ` [PATCH 4 of 4] xen/pagetables: Document pt_base inconsistency when running in COMPAT mode Konrad Rzeszutek Wilk
2012-08-22 9:21 ` Ian Campbell
2012-08-22 14:06 ` Konrad Rzeszutek Wilk [this message]
2012-08-22 14:17 ` Jan Beulich
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=20120822140649.GA31112@phenom.dumpdata.com \
--to=konrad@kernel.org \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=konrad.wilk@oracle.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.