ia64/xen-unstable

view patches/linux-2.6.16.13/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch @ 11472:3e31c5e160cf

[HVM] Fix an error when read from APIC registers like IRR, ISR and TMR.
From SDM3 spec, for APIC registers, all 32-bit registers should
be accessed using 128-bit aligned 32bit loads or stores.
And wider registers (64-bit or 256-bit) must be accessed using
multiple 32-bit loads or stores.

In old APIC virtualization code, we use IRR, ISR and TMR which are
256-bit registers as contiguous bit maps other than multiple 32-bit.

So guest always fetch error values.

Original patch was:
* Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
* Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
* Signed-off-by: Eddie Dong <eddie.dong@intel.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Sep 13 15:59:14 2006 +0100 (2006-09-13)
parents 6f36370e373a
children
line source
1 --- a/arch/x86_64/kernel/vmlinux.lds.S
2 +++ b/arch/x86_64/kernel/vmlinux.lds.S
3 @@ -13,6 +13,12 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86
4 OUTPUT_ARCH(i386:x86-64)
5 ENTRY(phys_startup_64)
6 jiffies_64 = jiffies;
7 +PHDRS {
8 + text PT_LOAD FLAGS(5); /* R_E */
9 + data PT_LOAD FLAGS(7); /* RWE */
10 + user PT_LOAD FLAGS(7); /* RWE */
11 + note PT_NOTE FLAGS(4); /* R__ */
12 +}
13 SECTIONS
14 {
15 . = __START_KERNEL;
16 @@ -31,7 +37,7 @@ SECTIONS
17 KPROBES_TEXT
18 *(.fixup)
19 *(.gnu.warning)
20 - } = 0x9090
21 + } :text = 0x9090
22 /* out-of-line lock text */
23 .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) { *(.text.lock) }
25 @@ -57,17 +63,10 @@ #endif
26 .data : AT(ADDR(.data) - LOAD_OFFSET) {
27 *(.data)
28 CONSTRUCTORS
29 - }
30 + } :data
32 _edata = .; /* End of data section */
34 - __bss_start = .; /* BSS */
35 - .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
36 - *(.bss.page_aligned)
37 - *(.bss)
38 - }
39 - __bss_stop = .;
40 -
41 . = ALIGN(PAGE_SIZE);
42 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
43 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
44 @@ -89,7 +88,7 @@ #define VVIRT_OFFSET (VSYSCALL_ADDR - VS
45 #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET)
47 . = VSYSCALL_ADDR;
48 - .vsyscall_0 : AT(VSYSCALL_PHYS_ADDR) { *(.vsyscall_0) }
49 + .vsyscall_0 : AT(VSYSCALL_PHYS_ADDR) { *(.vsyscall_0) } :user
50 __vsyscall_0 = VSYSCALL_VIRT_ADDR;
52 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
53 @@ -132,7 +131,7 @@ #undef VVIRT
54 . = ALIGN(8192); /* init_task */
55 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
56 *(.data.init_task)
57 - }
58 + } :data
60 . = ALIGN(4096);
61 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
62 @@ -222,6 +221,14 @@ SECTIONS
63 . = ALIGN(4096);
64 __nosave_end = .;
66 + __bss_start = .; /* BSS */
67 + . = ALIGN(4096);
68 + .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
69 + *(.bss.page_aligned)
70 + *(.bss)
71 + }
72 + __bss_stop = .;
73 +
74 _end = . ;
76 /* Sections to be discarded */
77 @@ -235,4 +242,6 @@ #endif
78 STABS_DEBUG
80 DWARF_DEBUG
81 +
82 + NOTES
83 }