From: Alok Kataria <akataria@vmware.com>
To: torvalds@linux-foundation.org, Ingo Molnar <mingo@elte.hu>
Cc: Zachary Amsden <zach@vmware.com>,
the arch/x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH]Fix broken VMI in 2.6.27-rc..
Date: Thu, 07 Aug 2008 12:12:45 -0700 [thread overview]
Message-ID: <1218136365.23770.52.camel@alok-dev1> (raw)
Hi Linus,
The patch below fixes VMI for 2.6.27-rc..
There were these 2 commits which made their way in 2.6.27-rc1 which
broke VMI.
x86: move fix mapping page table range early
commit e7b3789524eecc96213dd69d6686efd429235051
Author: Yinghai Lu <yhlu.kernel@gmail.com>
x86: use acpi_numa_init to parse on 32-bit numa
commit 1c6e55032e24ff79668581a0f296c278ef7edd4e
Author: Yinghai Lu <yhlu.kernel@gmail.com>
VMI relies on relocating the fixmap area to make room for the
hypervisor. These 2 commits started accessing the fixmap area's and
using them before VMI got a chance to check if it wants to relocate the
fixmap area. Once VMI got to the point of relocating the fixmap area's
it resulted in BUG's.
The patch below moves the vmi_init call right after max_low_pfn
is initialized and before we touch the fixmap areas. Also added some
comment so that people know that VMI may relocate the fixmaps.
Please apply.
Thanks,
Alok
--
From: Alok N Kataria <akataria@vmware.com>
Move the vmi_init call right after max_low_pfn is initialized and before
we touch the fixmap areas. Also, document the fact that VMI may relocate
the fixmaps, so that the next programmer doesn't accidently break VMI.
Signed-off-by: Alok N Kataria <akataria@vmware.com>
Signed-off-by: Zachary Amsden <zach@vmware.com>
---
arch/x86/kernel/setup.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 2d88858..132b8cd 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -742,6 +742,17 @@ void __init setup_arch(char **cmdline_p)
high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1;
#endif
+#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
+ /*
+ * Must be after max_low_pfn is determined, and before kernel
+ * pagetables are setup.
+ * Also if a VMI ROM is found we relocate the fixmap area to reserve
+ * space for the hypervisor, make sure this is done before we start
+ * playing with the fixmap areas.
+ */
+ vmi_init();
+#endif
+
/* max_pfn_mapped is updated here */
max_low_pfn_mapped = init_memory_mapping(0, max_low_pfn<<PAGE_SHIFT);
max_pfn_mapped = max_low_pfn_mapped;
@@ -817,14 +828,6 @@ void __init setup_arch(char **cmdline_p)
kvmclock_init();
#endif
-#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
- /*
- * Must be after max_low_pfn is determined, and before kernel
- * pagetables are setup.
- */
- vmi_init();
-#endif
-
paravirt_pagetable_setup_start(swapper_pg_dir);
paging_init();
paravirt_pagetable_setup_done(swapper_pg_dir);
next reply other threads:[~2008-08-07 19:12 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-07 19:12 Alok Kataria [this message]
2008-08-07 21:20 ` [PATCH]Fix broken VMI in 2.6.27-rc H. Peter Anvin
2008-08-07 21:27 ` Zachary Amsden
2008-08-07 21:34 ` H. Peter Anvin
2008-08-07 21:42 ` Zachary Amsden
2008-08-07 21:52 ` H. Peter Anvin
2008-08-07 21:55 ` Zachary Amsden
2008-08-07 22:17 ` H. Peter Anvin
2008-08-07 22:38 ` Linus Torvalds
2008-08-07 22:58 ` H. Peter Anvin
2008-08-07 23:08 ` Linus Torvalds
2008-08-07 23:12 ` H. Peter Anvin
2008-08-07 23:26 ` Zachary Amsden
2008-08-07 23:49 ` Jeremy Fitzhardinge
2008-08-07 23:23 ` Jeremy Fitzhardinge
2008-08-08 19:15 ` Alok Kataria
2008-08-08 22:23 ` H. Peter Anvin
2008-08-07 23:21 ` Jeremy Fitzhardinge
2008-08-07 23:27 ` H. Peter Anvin
2008-08-07 23:46 ` Jeremy Fitzhardinge
2008-08-07 23:51 ` H. Peter Anvin
2008-08-08 0:01 ` Yinghai Lu
2008-08-08 0:11 ` H. Peter Anvin
2008-08-08 0:10 ` Jeremy Fitzhardinge
2008-08-08 0:13 ` H. Peter Anvin
2008-08-08 0:23 ` Jeremy Fitzhardinge
2008-08-08 0:29 ` H. Peter Anvin
2008-08-08 6:10 ` Jeremy Fitzhardinge
2008-08-08 16:13 ` H. Peter Anvin
2008-08-08 1:14 ` Zachary Amsden
2008-08-08 1:19 ` H. Peter Anvin
2008-08-08 1:28 ` Zachary Amsden
2008-08-07 21:41 ` Alok Kataria
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=1218136365.23770.52.camel@alok-dev1 \
--to=akataria@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
--cc=zach@vmware.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