From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] x86: add .data.page_aligned section Date: Tue, 04 May 2010 16:51:44 +0100 Message-ID: <4BE05EB0020000780000131D@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part012BA780.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part012BA780.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline ... 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 --- 2010-03-02.orig/xen/arch/x86/boot/x86_32.S 2008-09-23 09:17:27.0000000= 00 +0200 +++ 2010-03-02/xen/arch/x86/boot/x86_32.S 2010-03-09 14:34:38.0000000= 00 +0100 @@ -61,6 +61,8 @@ ignore_int: jnz 0b 1: jmp 1b =20 + .data + ALIGN ENTRY(stack_start) .long cpu0_stack =20 @@ -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 =20 + .section .data.page_aligned, "aw", @progbits .align PAGE_SIZE, 0 /* NB. Rings !=3D 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.0000000= 00 +0200 +++ 2010-03-02/xen/arch/x86/boot/x86_64.S 2010-03-09 14:35:26.0000000= 00 +0100 @@ -78,7 +78,8 @@ ignore_int: =20 /*** DESCRIPTOR TABLES ***/ =20 - .align 8, 0xCC + .data + .align 8 multiboot_ptr: .long 0 =20 @@ -95,6 +96,7 @@ idt_descr: ENTRY(stack_start) .quad cpu0_stack =20 + .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 =20 + .data + .align 4 compat_page_list: .fill 12,4,0 =20 @@ -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 =20 - .align 4096,0 + .section .data.page_aligned, "aw", @progbits + .align PAGE_SIZE,0 =20 compat_pg_table_l2: .macro identmap from=3D0, count=3D512 --- 2010-03-02.orig/xen/arch/x86/xen.lds.S 2010-01-18 09:34:04.0000000= 00 +0100 +++ 2010-03-02/xen/arch/x86/xen.lds.S 2010-03-09 14:33:27.000000000 = +0100 @@ -53,6 +53,7 @@ SECTIONS } :text =20 .data : { /* Data */ + *(.data.page_aligned) *(.data) CONSTRUCTORS } :text --=__Part012BA780.0__= Content-Type: text/plain; name="x86-pagealigned-data.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-pagealigned-data.patch" ... and move page-aligned data there, instead of having random holes=0A(to = fulfill the demanded alignment) in the final image.=0A=0ASigned-off-by: = Jan Beulich =0A=0A--- 2010-03-02.orig/xen/arch/x86/boo= t/x86_32.S 2008-09-23 09:17:27.000000000 +0200=0A+++ 2010-03-02/xen/ar= ch/x86/boot/x86_32.S 2010-03-09 14:34:38.000000000 +0100=0A@@ -61,6 = +61,8 @@ ignore_int:=0A jnz 0b=0A 1: jmp 1b=0A =0A+ = .data=0A+ ALIGN=0A ENTRY(stack_start)=0A .long = cpu0_stack=0A =0A@@ -88,6 +90,7 @@ ENTRY(idle_pg_table)=0A = .long sym_phys(idle_pg_table_l2) + 2*PAGE_SIZE + 0x01, 0=0A .long = sym_phys(idle_pg_table_l2) + 3*PAGE_SIZE + 0x01, 0=0A =0A+ .section = .data.page_aligned, "aw", @progbits=0A .align PAGE_SIZE, 0=0A /* = NB. Rings !=3D 0 get access up to MACH2PHYS_VIRT_END. This allows access = to */=0A /* the machine->physical mapping table. Ring 0 can access all = memory. */=0A--- 2010-03-02.orig/xen/arch/x86/boot/x86_64.S 2008-09-23 = 09:17:27.000000000 +0200=0A+++ 2010-03-02/xen/arch/x86/boot/x86_64.S = 2010-03-09 14:35:26.000000000 +0100=0A@@ -78,7 +78,8 @@ ignore_int:=0A =0A = /*** DESCRIPTOR TABLES ***/=0A =0A- .align 8, 0xCC=0A+ = .data=0A+ .align 8=0A multiboot_ptr:=0A .long 0=0A =0A@@ = -95,6 +96,7 @@ idt_descr:=0A ENTRY(stack_start)=0A .quad = cpu0_stack=0A =0A+ .section .data.page_aligned, "aw", @progbits=0A = .align PAGE_SIZE, 0=0A ENTRY(boot_cpu_gdt_table)=0A .quad = 0x0000000000000000 /* unused */=0A--- 2010-03-02.orig/xen/arch/x86/x86_= 64/compat_kexec.S 2007-07-04 12:13:16.000000000 +0200=0A+++ = 2010-03-02/xen/arch/x86/x86_64/compat_kexec.S 2010-03-09 14:36:10.0000000= 00 +0100=0A@@ -151,6 +151,8 @@ compatibility_mode:=0A call = *%eax=0A ud2=0A =0A+ .data=0A+ .align 4=0A compat_pag= e_list:=0A .fill 12,4,0=0A =0A@@ -166,7 +168,8 @@ compat_pg_table:= =0A .long SYM_PHYS(compat_pg_table_l2) + 2*PAGE_SIZE + 0x01, 0=0A = .long SYM_PHYS(compat_pg_table_l2) + 3*PAGE_SIZE + 0x01, 0=0A =0A- = .align 4096,0=0A+ .section .data.page_aligned, "aw", = @progbits=0A+ .align PAGE_SIZE,0=0A =0A compat_pg_table_l2:=0A = .macro identmap from=3D0, count=3D512=0A--- 2010-03-02.orig/xen/arch/x86= /xen.lds.S 2010-01-18 09:34:04.000000000 +0100=0A+++ 2010-03-02/xen/ar= ch/x86/xen.lds.S 2010-03-09 14:33:27.000000000 +0100=0A@@ -53,6 = +53,7 @@ SECTIONS=0A } :text=0A =0A .data : { /* = Data */=0A+ *(.data.page_aligned)=0A *(.data)=0A = CONSTRUCTORS=0A } :text=0A --=__Part012BA780.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part012BA780.0__=--