From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 5/6] docs: Document start_info changes in Xen 4.2.
Date: Mon, 18 Mar 2013 11:11:55 +0000 [thread overview]
Message-ID: <CD6CA6FB.5EA5A%keir@xen.org> (raw)
In-Reply-To: <5147009C02000078000C6486@nat28.tlf.novell.com>
On 18/03/2013 10:55, "Jan Beulich" <JBeulich@suse.com> wrote:
>>>> On 15.03.13 at 20:51, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
>> The 25833:bb85bbccb1c9. "x86/32-on-64: adjust Dom0 initial page table
>> layout"
>> fixes a bug in the reported value of pt_base versus where the page tables
>> actually start. This documents this in the start of the world header note.
>>
>> This clarifies the implied understanding that the page table space is
>> pointed by pt_base. As in it is ".. implied that the range of page-tables
>> is the range [pt_base, pt_base + nr_pt_frames), whereas that that range
>> here indeed is [pt_base - 2, pt_base -2 + nr_pt_frames)" (Jan Beulich).
>>
>> Also make it crystal clear that pt_base == %cr3.
>
> Question is - do we really want this? While I provided aforementioned
> fix, I was never really convinced whether it was the hypervisor or
> the kernel that misbehaved here. It just was so that dealing with this
> on the hypervisor side was much easier.
>
> Perhaps Keir would remember what the original intentions (if any)
> were regarding the page table layout (i.e. whether the above
> equality was really intended).
I think I did intend pt_base == cr3 == first page-table page in the
consecutive sequence of reserved pages on domain startup.
-- Keir
> Jan
>
>> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> ---
>> xen/include/public/xen.h | 12 +++++++++++-
>> 1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
>> index 73fd7e7..4dd9615 100644
>> --- a/xen/include/public/xen.h
>> +++ b/xen/include/public/xen.h
>> @@ -693,7 +693,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 and CR3 (x86)]
>> * 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.
>> @@ -705,6 +705,16 @@ typedef struct shared_info shared_info_t;
>> * 8. There is guaranteed to be at least 512kB padding after the final
>> * bootstrap element. If necessary, the bootstrap virtual region is
>> * extended by an extra 4MB to ensure this.
>> + *
>> + * Note: Prior to 25833:bb85bbccb1c9. ("x86/32-on-64 adjust Dom0 initial
>> page
>> + * table layout") a bug caused the pt_base (3.e above) and cr3 to not point
>> + * to the start of the guest page tables (it was offset by two pages).
>> + * This only manifested itself on 32-on-64 dom0 kernels and not 32-on-64
>> domU
>> + * or 64-bit kernels of any colour. The page tables for a 32-on-64 dom0 got
>> + * allocated in the order: 'first L1','first L2', 'first L3', so the offset
>> + * to the page table base is by two pages back. The initial domain if it is
>> + * 32-bit and runs under a 64-bit hypervisor should _NOT_ use two of the
>> + * pages preceding pt_base and mark them as reserved/unused.
>> */
>>
>> #define MAX_GUEST_CMDLINE 1024
>> --
>> 1.8.0.2
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
>
>
>
next prev parent reply other threads:[~2013-03-18 11:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 19:51 [PATCH v4] Documentation to various header files (v4?) Konrad Rzeszutek Wilk
2013-03-15 19:51 ` [PATCH 1/6] docs: Document the ELF_FEATURES entry Konrad Rzeszutek Wilk
2013-03-15 19:51 ` [PATCH 2/6] docs: Add some extra details to the ELF note Konrad Rzeszutek Wilk
2013-03-15 19:51 ` [PATCH 3/6] docs: Document the shared structure Konrad Rzeszutek Wilk
2013-03-15 19:51 ` [PATCH 4/6] docs: Document the dom0_vga_console_info structure Konrad Rzeszutek Wilk
2013-03-15 19:51 ` [PATCH 5/6] docs: Document start_info changes in Xen 4.2 Konrad Rzeszutek Wilk
2013-03-18 10:55 ` Jan Beulich
2013-03-18 11:11 ` Keir Fraser [this message]
2013-03-18 13:08 ` Jan Beulich
2013-03-15 19:51 ` [PATCH 6/6] docs: Document the XenBus structure Konrad Rzeszutek Wilk
2013-03-18 9:44 ` [PATCH v4] Documentation to various header files (v4?) Ian Campbell
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=CD6CA6FB.5EA5A%keir@xen.org \
--to=keir@xen.org \
--cc=Ian.Campbell@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xen.org \
/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).