Commit a483b654b5663ee506b6ecb1fa4561d5f4a31e4b
1 parent
6a78ece5
updated guest kernel patch for qemu-fast (Martin Koniczek)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1170 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
70 additions
and
305 deletions
linux-2.6-qemu-fast.patch deleted
100644 → 0
1 | -diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .32324-linux-2.6.0/arch/i386/Kconfig .32324-linux-2.6.0.updated/arch/i386/Kconfig | |
2 | ---- .32324-linux-2.6.0/arch/i386/Kconfig 2003-10-09 18:02:48.000000000 +1000 | |
3 | -+++ .32324-linux-2.6.0.updated/arch/i386/Kconfig 2003-12-26 16:46:49.000000000 +1100 | |
4 | -@@ -307,6 +307,14 @@ config X86_GENERIC | |
5 | - when it has moderate overhead. This is intended for generic | |
6 | - distributions kernels. | |
7 | - | |
8 | -+config QEMU | |
9 | -+ bool "Kernel to run under QEMU" | |
10 | -+ depends on EXPERIMENTAL | |
11 | -+ help | |
12 | -+ Select this if you want to boot the kernel inside qemu-fast, | |
13 | -+ the non-mmu version of the x86 emulator. See | |
14 | -+ <http://fabrice.bellard.free.fr/qemu/>. Say N. | |
15 | -+ | |
16 | - # | |
17 | - # Define implied options from the CPU selection here | |
18 | - # | |
19 | -diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .32324-linux-2.6.0/arch/i386/kernel/Makefile .32324-linux-2.6.0.updated/arch/i386/kernel/Makefile | |
20 | ---- .32324-linux-2.6.0/arch/i386/kernel/Makefile 2003-09-29 10:25:15.000000000 +1000 | |
21 | -+++ .32324-linux-2.6.0.updated/arch/i386/kernel/Makefile 2003-12-26 16:46:49.000000000 +1100 | |
22 | -@@ -46,12 +46,14 @@ quiet_cmd_syscall = SYSCALL $@ | |
23 | - cmd_syscall = $(CC) -nostdlib $(SYSCFLAGS_$(@F)) \ | |
24 | - -Wl,-T,$(filter-out FORCE,$^) -o $@ | |
25 | - | |
26 | -+export AFLAGS_vsyscall.lds.o += -P -C -U$(ARCH) | |
27 | -+ | |
28 | - vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 | |
29 | - SYSCFLAGS_vsyscall-sysenter.so = $(vsyscall-flags) | |
30 | - SYSCFLAGS_vsyscall-int80.so = $(vsyscall-flags) | |
31 | - | |
32 | - $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \ | |
33 | --$(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE | |
34 | -+$(obj)/vsyscall-%.so: $(src)/vsyscall.lds.s $(obj)/vsyscall-%.o FORCE | |
35 | - $(call if_changed,syscall) | |
36 | - | |
37 | - # We also create a special relocatable object that should mirror the symbol | |
38 | -@@ -62,5 +64,5 @@ $(obj)/built-in.o: $(obj)/vsyscall-syms. | |
39 | - $(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o | |
40 | - | |
41 | - SYSCFLAGS_vsyscall-syms.o = -r | |
42 | --$(obj)/vsyscall-syms.o: $(src)/vsyscall.lds $(obj)/vsyscall-sysenter.o FORCE | |
43 | -+$(obj)/vsyscall-syms.o: $(src)/vsyscall.lds.s $(obj)/vsyscall-sysenter.o FORCE | |
44 | - $(call if_changed,syscall) | |
45 | -diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .32324-linux-2.6.0/arch/i386/kernel/vmlinux.lds.S .32324-linux-2.6.0.updated/arch/i386/kernel/vmlinux.lds.S | |
46 | ---- .32324-linux-2.6.0/arch/i386/kernel/vmlinux.lds.S 2003-09-22 10:27:28.000000000 +1000 | |
47 | -+++ .32324-linux-2.6.0.updated/arch/i386/kernel/vmlinux.lds.S 2003-12-26 16:46:49.000000000 +1100 | |
48 | -@@ -3,6 +3,7 @@ | |
49 | - */ | |
50 | - | |
51 | - #include <asm-generic/vmlinux.lds.h> | |
52 | -+#include <asm/page.h> | |
53 | - | |
54 | - OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") | |
55 | - OUTPUT_ARCH(i386) | |
56 | -@@ -10,7 +11,7 @@ ENTRY(startup_32) | |
57 | - jiffies = jiffies_64; | |
58 | - SECTIONS | |
59 | - { | |
60 | -- . = 0xC0000000 + 0x100000; | |
61 | -+ . = __PAGE_OFFSET + 0x100000; | |
62 | - /* read-only */ | |
63 | - _text = .; /* Text and read-only data */ | |
64 | - .text : { | |
65 | -diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .32324-linux-2.6.0/arch/i386/kernel/vsyscall.lds .32324-linux-2.6.0.updated/arch/i386/kernel/vsyscall.lds | |
66 | ---- .32324-linux-2.6.0/arch/i386/kernel/vsyscall.lds 2003-09-22 10:07:26.000000000 +1000 | |
67 | -+++ .32324-linux-2.6.0.updated/arch/i386/kernel/vsyscall.lds 1970-01-01 10:00:00.000000000 +1000 | |
68 | -@@ -1,67 +0,0 @@ | |
69 | --/* | |
70 | -- * Linker script for vsyscall DSO. The vsyscall page is an ELF shared | |
71 | -- * object prelinked to its virtual address, and with only one read-only | |
72 | -- * segment (that fits in one page). This script controls its layout. | |
73 | -- */ | |
74 | -- | |
75 | --/* This must match <asm/fixmap.h>. */ | |
76 | --VSYSCALL_BASE = 0xffffe000; | |
77 | -- | |
78 | --SECTIONS | |
79 | --{ | |
80 | -- . = VSYSCALL_BASE + SIZEOF_HEADERS; | |
81 | -- | |
82 | -- .hash : { *(.hash) } :text | |
83 | -- .dynsym : { *(.dynsym) } | |
84 | -- .dynstr : { *(.dynstr) } | |
85 | -- .gnu.version : { *(.gnu.version) } | |
86 | -- .gnu.version_d : { *(.gnu.version_d) } | |
87 | -- .gnu.version_r : { *(.gnu.version_r) } | |
88 | -- | |
89 | -- /* This linker script is used both with -r and with -shared. | |
90 | -- For the layouts to match, we need to skip more than enough | |
91 | -- space for the dynamic symbol table et al. If this amount | |
92 | -- is insufficient, ld -shared will barf. Just increase it here. */ | |
93 | -- . = VSYSCALL_BASE + 0x400; | |
94 | -- | |
95 | -- .text : { *(.text) } :text =0x90909090 | |
96 | -- | |
97 | -- .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr | |
98 | -- .eh_frame : { KEEP (*(.eh_frame)) } :text | |
99 | -- .dynamic : { *(.dynamic) } :text :dynamic | |
100 | -- .useless : { | |
101 | -- *(.got.plt) *(.got) | |
102 | -- *(.data .data.* .gnu.linkonce.d.*) | |
103 | -- *(.dynbss) | |
104 | -- *(.bss .bss.* .gnu.linkonce.b.*) | |
105 | -- } :text | |
106 | --} | |
107 | -- | |
108 | --/* | |
109 | -- * We must supply the ELF program headers explicitly to get just one | |
110 | -- * PT_LOAD segment, and set the flags explicitly to make segments read-only. | |
111 | -- */ | |
112 | --PHDRS | |
113 | --{ | |
114 | -- text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ | |
115 | -- dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ | |
116 | -- eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ | |
117 | --} | |
118 | -- | |
119 | --/* | |
120 | -- * This controls what symbols we export from the DSO. | |
121 | -- */ | |
122 | --VERSION | |
123 | --{ | |
124 | -- LINUX_2.5 { | |
125 | -- global: | |
126 | -- __kernel_vsyscall; | |
127 | -- __kernel_sigreturn; | |
128 | -- __kernel_rt_sigreturn; | |
129 | -- | |
130 | -- local: *; | |
131 | -- }; | |
132 | --} | |
133 | -- | |
134 | --/* The ELF entry point can be used to set the AT_SYSINFO value. */ | |
135 | --ENTRY(__kernel_vsyscall); | |
136 | -diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .32324-linux-2.6.0/arch/i386/kernel/vsyscall.lds.S .32324-linux-2.6.0.updated/arch/i386/kernel/vsyscall.lds.S | |
137 | ---- .32324-linux-2.6.0/arch/i386/kernel/vsyscall.lds.S 1970-01-01 10:00:00.000000000 +1000 | |
138 | -+++ .32324-linux-2.6.0.updated/arch/i386/kernel/vsyscall.lds.S 2003-12-26 16:46:49.000000000 +1100 | |
139 | -@@ -0,0 +1,67 @@ | |
140 | -+/* | |
141 | -+ * Linker script for vsyscall DSO. The vsyscall page is an ELF shared | |
142 | -+ * object prelinked to its virtual address, and with only one read-only | |
143 | -+ * segment (that fits in one page). This script controls its layout. | |
144 | -+ */ | |
145 | -+#include <asm/fixmap.h> | |
146 | -+ | |
147 | -+VSYSCALL_BASE = __FIXADDR_TOP - 0x1000; | |
148 | -+ | |
149 | -+SECTIONS | |
150 | -+{ | |
151 | -+ . = VSYSCALL_BASE + SIZEOF_HEADERS; | |
152 | -+ | |
153 | -+ .hash : { *(.hash) } :text | |
154 | -+ .dynsym : { *(.dynsym) } | |
155 | -+ .dynstr : { *(.dynstr) } | |
156 | -+ .gnu.version : { *(.gnu.version) } | |
157 | -+ .gnu.version_d : { *(.gnu.version_d) } | |
158 | -+ .gnu.version_r : { *(.gnu.version_r) } | |
159 | -+ | |
160 | -+ /* This linker script is used both with -r and with -shared. | |
161 | -+ For the layouts to match, we need to skip more than enough | |
162 | -+ space for the dynamic symbol table et al. If this amount | |
163 | -+ is insufficient, ld -shared will barf. Just increase it here. */ | |
164 | -+ . = VSYSCALL_BASE + 0x400; | |
165 | -+ | |
166 | -+ .text : { *(.text) } :text =0x90909090 | |
167 | -+ | |
168 | -+ .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr | |
169 | -+ .eh_frame : { KEEP (*(.eh_frame)) } :text | |
170 | -+ .dynamic : { *(.dynamic) } :text :dynamic | |
171 | -+ .useless : { | |
172 | -+ *(.got.plt) *(.got) | |
173 | -+ *(.data .data.* .gnu.linkonce.d.*) | |
174 | -+ *(.dynbss) | |
175 | -+ *(.bss .bss.* .gnu.linkonce.b.*) | |
176 | -+ } :text | |
177 | -+} | |
178 | -+ | |
179 | -+/* | |
180 | -+ * We must supply the ELF program headers explicitly to get just one | |
181 | -+ * PT_LOAD segment, and set the flags explicitly to make segments read-only. | |
182 | -+ */ | |
183 | -+PHDRS | |
184 | -+{ | |
185 | -+ text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ | |
186 | -+ dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ | |
187 | -+ eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ | |
188 | -+} | |
189 | -+ | |
190 | -+/* | |
191 | -+ * This controls what symbols we export from the DSO. | |
192 | -+ */ | |
193 | -+VERSION | |
194 | -+{ | |
195 | -+ LINUX_2.5 { | |
196 | -+ global: | |
197 | -+ __kernel_vsyscall; | |
198 | -+ __kernel_sigreturn; | |
199 | -+ __kernel_rt_sigreturn; | |
200 | -+ | |
201 | -+ local: *; | |
202 | -+ }; | |
203 | -+} | |
204 | -+ | |
205 | -+/* The ELF entry point can be used to set the AT_SYSINFO value. */ | |
206 | -+ENTRY(__kernel_vsyscall); | |
207 | -diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .32324-linux-2.6.0/include/asm-i386/fixmap.h .32324-linux-2.6.0.updated/include/asm-i386/fixmap.h | |
208 | ---- .32324-linux-2.6.0/include/asm-i386/fixmap.h 2003-09-22 10:09:12.000000000 +1000 | |
209 | -+++ .32324-linux-2.6.0.updated/include/asm-i386/fixmap.h 2003-12-26 16:46:49.000000000 +1100 | |
210 | -@@ -14,6 +14,19 @@ | |
211 | - #define _ASM_FIXMAP_H | |
212 | - | |
213 | - #include <linux/config.h> | |
214 | -+ | |
215 | -+/* used by vmalloc.c, vsyscall.lds.S. | |
216 | -+ * | |
217 | -+ * Leave one empty page between vmalloc'ed areas and | |
218 | -+ * the start of the fixmap. | |
219 | -+ */ | |
220 | -+#ifdef CONFIG_QEMU | |
221 | -+#define __FIXADDR_TOP 0xa7fff000 | |
222 | -+#else | |
223 | -+#define __FIXADDR_TOP 0xfffff000 | |
224 | -+#endif | |
225 | -+ | |
226 | -+#ifndef __ASSEMBLY__ | |
227 | - #include <linux/kernel.h> | |
228 | - #include <asm/acpi.h> | |
229 | - #include <asm/apicdef.h> | |
230 | -@@ -94,13 +107,8 @@ extern void __set_fixmap (enum fixed_add | |
231 | - #define clear_fixmap(idx) \ | |
232 | - __set_fixmap(idx, 0, __pgprot(0)) | |
233 | - | |
234 | --/* | |
235 | -- * used by vmalloc.c. | |
236 | -- * | |
237 | -- * Leave one empty page between vmalloc'ed areas and | |
238 | -- * the start of the fixmap. | |
239 | -- */ | |
240 | --#define FIXADDR_TOP (0xfffff000UL) | |
241 | -+#define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP) | |
242 | -+ | |
243 | - #define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) | |
244 | - #define FIXADDR_START (FIXADDR_TOP - __FIXADDR_SIZE) | |
245 | - | |
246 | -@@ -145,4 +153,5 @@ static inline unsigned long virt_to_fix( | |
247 | - return __virt_to_fix(vaddr); | |
248 | - } | |
249 | - | |
250 | -+#endif /* !__ASSEMBLY__ */ | |
251 | - #endif | |
252 | -diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .32324-linux-2.6.0/include/asm-i386/page.h .32324-linux-2.6.0.updated/include/asm-i386/page.h | |
253 | ---- .32324-linux-2.6.0/include/asm-i386/page.h 2003-09-22 10:06:42.000000000 +1000 | |
254 | -+++ .32324-linux-2.6.0.updated/include/asm-i386/page.h 2003-12-26 16:46:49.000000000 +1100 | |
255 | -@@ -10,10 +10,10 @@ | |
256 | - #define LARGE_PAGE_SIZE (1UL << PMD_SHIFT) | |
257 | - | |
258 | - #ifdef __KERNEL__ | |
259 | --#ifndef __ASSEMBLY__ | |
260 | -- | |
261 | - #include <linux/config.h> | |
262 | - | |
263 | -+#ifndef __ASSEMBLY__ | |
264 | -+ | |
265 | - #ifdef CONFIG_X86_USE_3DNOW | |
266 | - | |
267 | - #include <asm/mmx.h> | |
268 | -@@ -115,12 +115,19 @@ static __inline__ int get_order(unsigned | |
269 | - #endif /* __ASSEMBLY__ */ | |
270 | - | |
271 | - #ifdef __ASSEMBLY__ | |
272 | -+#ifdef CONFIG_QEMU | |
273 | -+#define __PAGE_OFFSET (0x90000000) | |
274 | -+#else | |
275 | - #define __PAGE_OFFSET (0xC0000000) | |
276 | -+#endif /* QEMU */ | |
277 | -+#else | |
278 | -+#ifdef CONFIG_QEMU | |
279 | -+#define __PAGE_OFFSET (0x90000000UL) | |
280 | - #else | |
281 | - #define __PAGE_OFFSET (0xC0000000UL) | |
282 | -+#endif /* QEMU */ | |
283 | - #endif | |
284 | - | |
285 | -- | |
286 | - #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | |
287 | - #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) | |
288 | - #define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE) | |
289 | -diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .32324-linux-2.6.0/include/asm-i386/param.h .32324-linux-2.6.0.updated/include/asm-i386/param.h | |
290 | ---- .32324-linux-2.6.0/include/asm-i386/param.h 2003-09-21 17:26:06.000000000 +1000 | |
291 | -+++ .32324-linux-2.6.0.updated/include/asm-i386/param.h 2003-12-26 16:46:49.000000000 +1100 | |
292 | -@@ -2,7 +2,12 @@ | |
293 | - #define _ASMi386_PARAM_H | |
294 | - | |
295 | - #ifdef __KERNEL__ | |
296 | --# define HZ 1000 /* Internal kernel timer frequency */ | |
297 | -+# include <linux/config.h> | |
298 | -+# ifdef CONFIG_QEMU | |
299 | -+# define HZ 100 | |
300 | -+# else | |
301 | -+# define HZ 1000 /* Internal kernel timer frequency */ | |
302 | -+# endif | |
303 | - # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | |
304 | - # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | |
305 | - #endif |
linux-2.6.9-qemu-fast.patch
0 → 100644
1 | +--- linux-2.6.9/arch/i386/Kconfig 2004-10-18 23:53:22.000000000 +0200 | |
2 | ++++ linux-2.6.9-qemu/arch/i386/Kconfig 2004-12-07 21:56:49.000000000 +0100 | |
3 | +@@ -337,6 +337,14 @@ config X86_GENERIC | |
4 | + | |
5 | + endif | |
6 | + | |
7 | ++config QEMU | |
8 | ++ bool "Kernel to run under QEMU" | |
9 | ++ depends on EXPERIMENTAL | |
10 | ++ help | |
11 | ++ Select this if you want to boot the kernel inside qemu-fast, | |
12 | ++ the non-mmu version of the x86 emulator. See | |
13 | ++ <http://fabrice.bellard.free.fr/qemu/>. Say N. | |
14 | ++ | |
15 | + # | |
16 | + # Define implied options from the CPU selection here | |
17 | + # | |
18 | +--- linux-2.6.9/include/asm-i386/fixmap.h 2004-10-18 23:53:08.000000000 +0200 | |
19 | ++++ linux-2.6.9-qemu/include/asm-i386/fixmap.h 2004-12-07 23:16:11.000000000 +0100 | |
20 | +@@ -20,7 +20,11 @@ | |
21 | + * Leave one empty page between vmalloc'ed areas and | |
22 | + * the start of the fixmap. | |
23 | + */ | |
24 | ++#ifdef CONFIG_QEMU | |
25 | ++#define __FIXADDR_TOP 0xa7fff000 | |
26 | ++#else | |
27 | + #define __FIXADDR_TOP 0xfffff000 | |
28 | ++#endif | |
29 | + | |
30 | + #ifndef __ASSEMBLY__ | |
31 | + #include <linux/kernel.h> | |
32 | +--- linux-2.6.9/include/asm-i386/page.h 2004-10-18 23:53:22.000000000 +0200 | |
33 | ++++ linux-2.6.9-qemu/include/asm-i386/page.h 2004-12-07 21:56:49.000000000 +0100 | |
34 | +@@ -121,12 +121,19 @@ extern int sysctl_legacy_va_layout; | |
35 | + #endif /* __ASSEMBLY__ */ | |
36 | + | |
37 | + #ifdef __ASSEMBLY__ | |
38 | ++#ifdef CONFIG_QEMU | |
39 | ++#define __PAGE_OFFSET (0x90000000) | |
40 | ++#else | |
41 | + #define __PAGE_OFFSET (0xC0000000) | |
42 | ++#endif /* QEMU */ | |
43 | ++#else | |
44 | ++#ifdef CONFIG_QEMU | |
45 | ++#define __PAGE_OFFSET (0x90000000UL) | |
46 | + #else | |
47 | + #define __PAGE_OFFSET (0xC0000000UL) | |
48 | ++#endif /* QEMU */ | |
49 | + #endif | |
50 | + | |
51 | +- | |
52 | + #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | |
53 | + #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) | |
54 | + #define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE) | |
55 | +--- linux-2.6.9/include/asm-i386/param.h 2004-10-18 23:53:24.000000000 +0200 | |
56 | ++++ linux-2.6.9-qemu/include/asm-i386/param.h 2004-12-07 21:56:49.000000000 +0100 | |
57 | +@@ -2,7 +2,12 @@ | |
58 | + #define _ASMi386_PARAM_H | |
59 | + | |
60 | + #ifdef __KERNEL__ | |
61 | +-# define HZ 1000 /* Internal kernel timer frequency */ | |
62 | ++# include <linux/config.h> | |
63 | ++# ifdef CONFIG_QEMU | |
64 | ++# define HZ 100 | |
65 | ++# else | |
66 | ++# define HZ 1000 /* Internal kernel timer frequency */ | |
67 | ++# endif | |
68 | + # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | |
69 | + # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | |
70 | + #endif | ... | ... |