xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] x86: add .data.page_aligned section
Date: Tue, 04 May 2010 16:51:44 +0100	[thread overview]
Message-ID: <4BE05EB0020000780000131D@vpn.id2.novell.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2541 bytes --]

... and move page-aligned data there, instead of having random holes
(to fulfill the demanded alignment) in the final image.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 2010-03-02.orig/xen/arch/x86/boot/x86_32.S	2008-09-23 09:17:27.000000000 +0200
+++ 2010-03-02/xen/arch/x86/boot/x86_32.S	2010-03-09 14:34:38.000000000 +0100
@@ -61,6 +61,8 @@ ignore_int:
         jnz     0b
 1:      jmp     1b
 
+        .data
+        ALIGN
 ENTRY(stack_start)
         .long cpu0_stack
         
@@ -88,6 +90,7 @@ ENTRY(idle_pg_table)
         .long sym_phys(idle_pg_table_l2) + 2*PAGE_SIZE + 0x01, 0
         .long sym_phys(idle_pg_table_l2) + 3*PAGE_SIZE + 0x01, 0
 
+        .section .data.page_aligned, "aw", @progbits
         .align PAGE_SIZE, 0
 /* NB. Rings != 0 get access up to MACH2PHYS_VIRT_END. This allows access to */
 /*     the machine->physical mapping table. Ring 0 can access all memory.    */
--- 2010-03-02.orig/xen/arch/x86/boot/x86_64.S	2008-09-23 09:17:27.000000000 +0200
+++ 2010-03-02/xen/arch/x86/boot/x86_64.S	2010-03-09 14:35:26.000000000 +0100
@@ -78,7 +78,8 @@ ignore_int:
 
 /*** DESCRIPTOR TABLES ***/
 
-        .align 8, 0xCC
+        .data
+        .align 8
 multiboot_ptr:
         .long   0
 
@@ -95,6 +96,7 @@ idt_descr:
 ENTRY(stack_start)
         .quad   cpu0_stack
 
+        .section .data.page_aligned, "aw", @progbits
         .align PAGE_SIZE, 0
 ENTRY(boot_cpu_gdt_table)
         .quad 0x0000000000000000     /* unused */
--- 2010-03-02.orig/xen/arch/x86/x86_64/compat_kexec.S	2007-07-04 12:13:16.000000000 +0200
+++ 2010-03-02/xen/arch/x86/x86_64/compat_kexec.S	2010-03-09 14:36:10.000000000 +0100
@@ -151,6 +151,8 @@ compatibility_mode:
         call *%eax
         ud2
 
+        .data
+        .align 4
 compat_page_list:
         .fill 12,4,0
 
@@ -166,7 +168,8 @@ compat_pg_table:
         .long SYM_PHYS(compat_pg_table_l2) + 2*PAGE_SIZE + 0x01, 0
         .long SYM_PHYS(compat_pg_table_l2) + 3*PAGE_SIZE + 0x01, 0
 
-        .align 4096,0
+        .section .data.page_aligned, "aw", @progbits
+        .align PAGE_SIZE,0
 
 compat_pg_table_l2:
         .macro identmap from=0, count=512
--- 2010-03-02.orig/xen/arch/x86/xen.lds.S	2010-01-18 09:34:04.000000000 +0100
+++ 2010-03-02/xen/arch/x86/xen.lds.S	2010-03-09 14:33:27.000000000 +0100
@@ -53,6 +53,7 @@ SECTIONS
   } :text
 
   .data : {                    /* Data */
+       *(.data.page_aligned)
        *(.data)
        CONSTRUCTORS
   } :text




[-- Attachment #2: x86-pagealigned-data.patch --]
[-- Type: text/plain, Size: 2535 bytes --]

... and move page-aligned data there, instead of having random holes
(to fulfill the demanded alignment) in the final image.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 2010-03-02.orig/xen/arch/x86/boot/x86_32.S	2008-09-23 09:17:27.000000000 +0200
+++ 2010-03-02/xen/arch/x86/boot/x86_32.S	2010-03-09 14:34:38.000000000 +0100
@@ -61,6 +61,8 @@ ignore_int:
         jnz     0b
 1:      jmp     1b
 
+        .data
+        ALIGN
 ENTRY(stack_start)
         .long cpu0_stack
         
@@ -88,6 +90,7 @@ ENTRY(idle_pg_table)
         .long sym_phys(idle_pg_table_l2) + 2*PAGE_SIZE + 0x01, 0
         .long sym_phys(idle_pg_table_l2) + 3*PAGE_SIZE + 0x01, 0
 
+        .section .data.page_aligned, "aw", @progbits
         .align PAGE_SIZE, 0
 /* NB. Rings != 0 get access up to MACH2PHYS_VIRT_END. This allows access to */
 /*     the machine->physical mapping table. Ring 0 can access all memory.    */
--- 2010-03-02.orig/xen/arch/x86/boot/x86_64.S	2008-09-23 09:17:27.000000000 +0200
+++ 2010-03-02/xen/arch/x86/boot/x86_64.S	2010-03-09 14:35:26.000000000 +0100
@@ -78,7 +78,8 @@ ignore_int:
 
 /*** DESCRIPTOR TABLES ***/
 
-        .align 8, 0xCC
+        .data
+        .align 8
 multiboot_ptr:
         .long   0
 
@@ -95,6 +96,7 @@ idt_descr:
 ENTRY(stack_start)
         .quad   cpu0_stack
 
+        .section .data.page_aligned, "aw", @progbits
         .align PAGE_SIZE, 0
 ENTRY(boot_cpu_gdt_table)
         .quad 0x0000000000000000     /* unused */
--- 2010-03-02.orig/xen/arch/x86/x86_64/compat_kexec.S	2007-07-04 12:13:16.000000000 +0200
+++ 2010-03-02/xen/arch/x86/x86_64/compat_kexec.S	2010-03-09 14:36:10.000000000 +0100
@@ -151,6 +151,8 @@ compatibility_mode:
         call *%eax
         ud2
 
+        .data
+        .align 4
 compat_page_list:
         .fill 12,4,0
 
@@ -166,7 +168,8 @@ compat_pg_table:
         .long SYM_PHYS(compat_pg_table_l2) + 2*PAGE_SIZE + 0x01, 0
         .long SYM_PHYS(compat_pg_table_l2) + 3*PAGE_SIZE + 0x01, 0
 
-        .align 4096,0
+        .section .data.page_aligned, "aw", @progbits
+        .align PAGE_SIZE,0
 
 compat_pg_table_l2:
         .macro identmap from=0, count=512
--- 2010-03-02.orig/xen/arch/x86/xen.lds.S	2010-01-18 09:34:04.000000000 +0100
+++ 2010-03-02/xen/arch/x86/xen.lds.S	2010-03-09 14:33:27.000000000 +0100
@@ -53,6 +53,7 @@ SECTIONS
   } :text
 
   .data : {                    /* Data */
+       *(.data.page_aligned)
        *(.data)
        CONSTRUCTORS
   } :text

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

                 reply	other threads:[~2010-05-04 15:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4BE05EB0020000780000131D@vpn.id2.novell.com \
    --to=jbeulich@novell.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 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).