[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86802c440812091715r775d514eh3acf9add9e24184e@mail.gmail.com>
Date: Tue, 9 Dec 2008 17:15:05 -0800
From: "Yinghai Lu" <yinghai@...nel.org>
To: "Zachary Amsden" <zach@...are.com>,
"Huang Ying" <ying.huang@...el.com>,
"Jeremy Fitzhardinge" <jeremy@...p.org>,
"H. Peter Anvin" <hpa@...or.com>,
"Thomas Gleixner" <tglx@...utronix.de>,
"Ingo Molnar" <mingo@...e.hu>,
"Andrew Morton" <akpm@...ux-foundation.org>
Cc: norman@...backs.co.uk,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
"Linus Torvalds" <torvalds@...ux-foundation.org>,
"Greg KH" <gregkh@...e.de>,
"Alok Kataria" <alokkataria1@...il.com>,
"Bruno Prémont" <"bruno .premont"@restena.lu>,
xl@...igned.net, dsd@...too.org
Subject: Re: [PATCH] Fix VMI crash on boot in 2.6.27+ kernels
On Tue, Dec 9, 2008 at 4:50 PM, Zachary Amsden <zach@...are.com> wrote:
> Patches backported into 2.6.27.4 caused a regression with VMI kernels
> running on VMware which ends in a page fault during boot. I have a fix
> which still allows DMI checks to be done early.
>
> The best fix is perhaps to move early_ioremap_init() after vmi_init().
> The only things done before VMI init are basic memory access, things
> like collating the memory map, collecting boot CPUID capabilities, and
> parsing the early command line options... which vmi_init needs.
>
> Since this went back into 2.6.27, it needs to go to both 2.6.28 and
> eventually to stable. I didn't add any comments or anything as there
> could be some debate what the proper ordering should be. In case that
> becomes an interesting discussion, there are two relevant facts in git
> today:
>
> 1) no clients of early_ioremap occur before DMI.
> 2) VMI requires access to early boot params.
>
> If any can suggest a better ordering, I am certainly open to that as
> well.
VMI initialiation can relocate the fixmap, causing early_ioremap
to malfunction if it is initialized before the relocation. The
ioremap area is low enough in virtual address space that no actual
collision occurs, however, because the pagetables for it were not
allocated under VMI mode, the pagetable updates are dropped by
the hypervisor as irrelevant, resulting in a crash on boot.
Signed-off-by: Zachary Amsden <zach@...are.com>
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 9d5674f..9627753 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -795,7 +795,6 @@ void __init setup_arch(char **cmdline_p)
#endif
early_cpu_init();
- early_ioremap_init();
ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev);
screen_info = boot_params.screen_info;
@@ -888,6 +887,8 @@ void __init setup_arch(char **cmdline_p)
vmi_init();
#endif
+ early_ioremap_init();
+
/* after early param, so could get panic from serial */
reserve_early_setup_data();
you can not move that late,
parse_setup_data==>early_memremap==>__early_ioremap
YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists