LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andi Kleen <ak@muc.de>, Andrew Morton <akpm@osdl.org>,
virtualization@lists.osdl.org, xen-devel@lists.xensource.com,
Chris Wright <chrisw@sous-sol.org>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 16/21] Xen-paravirt: Add code into head.S to handle being booted by Xen
Date: Wed, 14 Feb 2007 13:33:13 -0700 [thread overview]
Message-ID: <m1sld8pjhy.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20070213221830.707197267@goop.org> (Jeremy Fitzhardinge's message of "Tue, 13 Feb 2007 14:17:45 -0800")
Jeremy Fitzhardinge <jeremy@goop.org> writes:
There need to be alignment directives for the page aligned chunks.
Placing the page aligned chunks in a special section is nice in that
it ensures the linker packs everything tightly but should be
completely unnecessary if the alignment is correct.
>
> ===================================================================
> --- a/arch/i386/kernel/head.S
> +++ b/arch/i386/kernel/head.S
> @@ -519,6 +519,10 @@ 1:
> jmp 1b
> #endif
>
> +#ifdef CONFIG_XEN
> +#include "../xen/xen-head.S"
> +#endif
> +
> /*
> * Real beginning of normal "text" segment
> */
> @@ -528,7 +532,7 @@ ENTRY(_stext)
> /*
> * BSS section
> */
> -.section ".bss.page_aligned","w"
> +.section ".bss.page_aligned"
> ENTRY(swapper_pg_dir)
> .fill 1024,4,0
> ENTRY(empty_zero_page)
> @@ -598,7 +602,8 @@ ENTRY(boot_gdt_table)
> /*
> * The Global Descriptor Table contains 28 quadwords, per-CPU.
> */
> - .align L1_CACHE_BYTES
> + .section ".data.page_aligned"
> + .align PAGE_SIZE_asm
> ENTRY(cpu_gdt_table)
> .quad 0x0000000000000000 /* NULL descriptor */
> .quad 0x0000000000000000 /* 0x0b reserved */
> @@ -647,3 +652,6 @@ ENTRY(cpu_gdt_table)
> .quad 0x0000000000000000 /* 0xf0 - unused */
> .quad 0x0000000000000000 /* 0xf8 - GDT entry 31: double-fault TSS */
>
> + /* Be sure this is zeroed to avoid false validations in Xen */
> + .fill PAGE_SIZE_asm / 8 - GDT_ENTRIES,8,0
> + .previous
> ===================================================================
> --- a/arch/i386/kernel/vmlinux.lds.S
> +++ b/arch/i386/kernel/vmlinux.lds.S
> @@ -93,6 +93,7 @@ SECTIONS
>
> . = ALIGN(4096);
> .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
> + *(.data.page_aligned)
> *(.data.idt)
> }
>
> --- /dev/null
> +++ b/arch/i386/xen/xen-head.S
> @@ -0,0 +1,29 @@
> +/* Xen-specific pieces of head.S, intended to be included in the right
> + place in head.S */
> +
> +#include <linux/elfnote.h>
> +#include <asm/boot.h>
> +#include <xen/interface/elfnote.h>
> +
> +ENTRY(startup_xen)
> + movl %esi,xen_start_info
> + jmp startup_paravirt
> +
> +.pushsection ".bss.page_aligned"
> +ENTRY(hypercall_page)
> + .skip 0x1000
> +.popsection
> +
> + ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz, "linux")
> + ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz, "2.6")
> + ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz, "xen-3.0")
> + ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, .long, __PAGE_OFFSET)
> + ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .long, startup_xen)
> + ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long, hypercall_page)
> + ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz,
> "!writable_page_tables|pae_pgdir_above_4gb")
> +#ifdef CONFIG_X86_PAE
> + ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz, "yes")
> +#else
> + ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz, "no")
> +#endif
> + ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz, "generic")
next prev parent reply other threads:[~2007-02-14 20:35 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070213221729.772002682@goop.org>
[not found] ` <20070213221829.929261125@goop.org>
2007-02-13 22:39 ` [patch 06/21] Xen-paravirt: remove ctor for pgd cache Zachary Amsden
[not found] ` <20070213221830.466651996@goop.org>
2007-02-13 22:45 ` [patch 13/21] Xen-paravirt: Add nosegneg capability to the vsyscall page notes Zachary Amsden
2007-02-13 22:49 ` Jeremy Fitzhardinge
2007-02-13 22:54 ` Zachary Amsden
2007-02-13 23:13 ` Jeremy Fitzhardinge
2007-02-14 5:38 ` [Xen-devel] " Rusty Russell
[not found] ` <20070213221830.542511707@goop.org>
2007-02-13 22:53 ` [patch 14/21] Xen-paravirt: Add XEN config options and disable unsupported config options Dan Hecht
2007-02-13 23:29 ` Jeremy Fitzhardinge
2007-02-13 23:58 ` [Xen-devel] " Zachary Amsden
2007-02-13 23:58 ` Dan Hecht
[not found] ` <20070213221830.238235953@goop.org>
2007-02-14 1:06 ` [patch 10/21] Xen-paravirt: Name: dont export paravirt_ops structure, do individual functions Zachary Amsden
2007-02-14 1:16 ` Jeremy Fitzhardinge
2007-02-14 1:18 ` Zachary Amsden
2007-02-14 1:37 ` Jeremy Fitzhardinge
2007-02-14 1:43 ` Zachary Amsden
2007-02-14 1:44 ` Jeremy Fitzhardinge
2007-02-14 5:51 ` Rusty Russell
2007-02-14 19:36 ` Christoph Hellwig
[not found] ` <20070213221829.845132535@goop.org>
2007-02-14 1:23 ` [patch 05/21] Xen-paravirt: paravirt_ops: allocate a fixmap slot Dan Hecht
2007-02-14 1:36 ` Jeremy Fitzhardinge
2007-02-14 2:34 ` Dan Hecht
2007-02-14 8:43 ` Gerd Hoffmann
2007-02-14 8:37 ` [Xen-devel] " Jan Beulich
2007-02-14 9:15 ` Andi Kleen
[not found] ` <20070213221829.513618819@goop.org>
2007-02-14 9:24 ` [patch 02/21] Xen-paravirt: Handle a zero-sized VT console Gerd Hoffmann
[not found] ` <20070213221830.707197267@goop.org>
2007-02-13 23:54 ` [patch 16/21] Xen-paravirt: Add code into head.S to handle being booted by Xen Andi Kleen
2007-02-14 0:39 ` Jeremy Fitzhardinge
2007-02-14 8:56 ` [Xen-devel] " Jan Beulich
2007-02-14 18:53 ` Jeremy Fitzhardinge
2007-02-14 20:10 ` Eric W. Biederman
2007-02-14 20:41 ` Jeremy Fitzhardinge
2007-02-14 21:06 ` Eric W. Biederman
2007-02-15 0:13 ` Jeremy Fitzhardinge
2007-02-15 1:39 ` Eric W. Biederman
2007-02-15 1:52 ` Jeremy Fitzhardinge
2007-02-15 2:18 ` Eric W. Biederman
2007-02-15 2:23 ` Jeremy Fitzhardinge
2007-02-15 2:41 ` Eric W. Biederman
2007-02-14 20:33 ` Eric W. Biederman [this message]
2007-02-14 20:42 ` Jeremy Fitzhardinge
[not found] ` <20070213221831.150207238@goop.org>
2007-02-14 20:40 ` [patch 21/21] Xen-paravirt: Add the Xen virtual network device driver Eric W. Biederman
[not found] ` <20070213221830.619562494@goop.org>
2007-02-14 20:45 ` [patch 15/21] Xen-paravirt: Add Xen interface header files Eric W. Biederman
2007-02-15 0:10 ` Jeremy Fitzhardinge
2007-02-15 17:32 ` Christoph Hellwig
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=m1sld8pjhy.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.osdl.org \
--cc=xen-devel@lists.xensource.com \
--subject='Re: [patch 16/21] Xen-paravirt: Add code into head.S to handle being booted by Xen' \
/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
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).