From: "Martin Koniczek" <martin@koniczek.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] cleaned patch for host kernel running linux-2.6.9
Date: Wed, 8 Dec 2004 13:34:01 +0100 [thread overview]
Message-ID: <074f01c4dd22$3a578fa0$c6449b86@vaion> (raw)
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
works fine for me... attention, its one of my first "released" patchworks,
use at own risk, feedback welcome
i hope i got everything right:
- just removed the patches which where incorporated into
official 2.6.9 kernel by rusty
- made a new diff to get cleaner and better fitting results vs. 2.6.9
[-- Attachment #2: linux-2.6.9-qemu-fast.patch --]
[-- Type: application/octet-stream, Size: 2250 bytes --]
--- linux-2.6.9/arch/i386/Kconfig 2004-10-18 23:53:22.000000000 +0200
+++ linux-2.6.9-qemu/arch/i386/Kconfig 2004-12-07 21:56:49.000000000 +0100
@@ -337,6 +337,14 @@ config X86_GENERIC
endif
+config QEMU
+ bool "Kernel to run under QEMU"
+ depends on EXPERIMENTAL
+ help
+ Select this if you want to boot the kernel inside qemu-fast,
+ the non-mmu version of the x86 emulator. See
+ <http://fabrice.bellard.free.fr/qemu/>. Say N.
+
#
# Define implied options from the CPU selection here
#
--- linux-2.6.9/include/asm-i386/fixmap.h 2004-10-18 23:53:08.000000000 +0200
+++ linux-2.6.9-qemu/include/asm-i386/fixmap.h 2004-12-07 23:16:11.000000000 +0100
@@ -20,7 +20,11 @@
* Leave one empty page between vmalloc'ed areas and
* the start of the fixmap.
*/
+#ifdef CONFIG_QEMU
+#define __FIXADDR_TOP 0xa7fff000
+#else
#define __FIXADDR_TOP 0xfffff000
+#endif
#ifndef __ASSEMBLY__
#include <linux/kernel.h>
--- linux-2.6.9/include/asm-i386/page.h 2004-10-18 23:53:22.000000000 +0200
+++ linux-2.6.9-qemu/include/asm-i386/page.h 2004-12-07 21:56:49.000000000 +0100
@@ -121,12 +121,19 @@ extern int sysctl_legacy_va_layout;
#endif /* __ASSEMBLY__ */
#ifdef __ASSEMBLY__
+#ifdef CONFIG_QEMU
+#define __PAGE_OFFSET (0x90000000)
+#else
#define __PAGE_OFFSET (0xC0000000)
+#endif /* QEMU */
+#else
+#ifdef CONFIG_QEMU
+#define __PAGE_OFFSET (0x90000000UL)
#else
#define __PAGE_OFFSET (0xC0000000UL)
+#endif /* QEMU */
#endif
-
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
#define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE)
#define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE)
--- linux-2.6.9/include/asm-i386/param.h 2004-10-18 23:53:24.000000000 +0200
+++ linux-2.6.9-qemu/include/asm-i386/param.h 2004-12-07 21:56:49.000000000 +0100
@@ -2,7 +2,12 @@
#define _ASMi386_PARAM_H
#ifdef __KERNEL__
-# define HZ 1000 /* Internal kernel timer frequency */
+# include <linux/config.h>
+# ifdef CONFIG_QEMU
+# define HZ 100
+# else
+# define HZ 1000 /* Internal kernel timer frequency */
+# endif
# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
#endif
reply other threads:[~2004-12-08 12:44 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='074f01c4dd22$3a578fa0$c6449b86@vaion' \
--to=martin@koniczek.de \
--cc=qemu-devel@nongnu.org \
/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).