From: Yinghai Lu <yinghai@kernel.org>
To: Zachary Amsden <zach@vmware.com>
Cc: "Huang Ying" <ying.huang@intel.com>,
"Jeremy Fitzhardinge" <jeremy@goop.org>,
"H. Peter Anvin" <hpa@zytor.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@elte.hu>,
"Andrew Morton" <akpm@linux-foundation.org>,
"norman@thebacks.co.uk" <norman@thebacks.co.uk>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Greg KH" <gregkh@suse.de>,
"Alok Kataria" <alokkataria1@gmail.com>,
"Bruno Prémont" <"bruno .premont"@restena.lu>,
"xl@xlsigned.net" <xl@xlsigned.net>,
"dsd@gentoo.org" <dsd@gentoo.org>
Subject: Re: [PATCH] Fix VMI crash on boot in 2.6.27+ kernels
Date: Wed, 10 Dec 2008 16:20:06 -0800 [thread overview]
Message-ID: <49405CB6.6010006@kernel.org> (raw)
In-Reply-To: <1228953980.8766.42.camel@bodhitayantram.eng.vmware.com>
Zachary Amsden wrote:
> On Tue, 2008-12-09 at 17:15 -0800, Yinghai Lu wrote:
>
>> you can not move that late,
>>
>> parse_setup_data==>early_memremap==>__early_ioremap
>
> How does this look?
>
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 9d5674f..4c381cb 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -794,6 +794,11 @@ void __init setup_arch(char **cmdline_p)
printk(KERN_INFO "Command line: %s\n", boot_command_line);
#endif
+#ifdef CONFIG_VMI
+ /* VMI may relocate the fixmap; do this before touching ioremap area */
+ vmi_init();
+#endif
+
early_cpu_init();
early_ioremap_init();
@@ -880,12 +885,9 @@ void __init setup_arch(char **cmdline_p)
check_efer();
#endif
-#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
- /*
- * Must be before kernel pagetables are setup
- * or fixmap area is touched.
- */
- vmi_init();
+#if defined(CONFIG_VMI)
+ /* Must be before kernel pagetables are setup */
+ vmi_activate();
#endif
/* after early param, so could get panic from serial */
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index 8b6c393..22fd657 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -960,8 +960,6 @@ static inline int __init activate_vmi(void)
void __init vmi_init(void)
{
- unsigned long flags;
-
if (!vmi_rom)
probe_vmi_rom();
else
@@ -973,13 +971,21 @@ void __init vmi_init(void)
reserve_top_address(-vmi_rom->virtual_top);
it seems still have some problem.
you moved reserve_top_address before parse_parameter...
so
void __init reserve_top_address(unsigned long reserve)
{
BUG_ON(fixmaps_set > 0);
printk(KERN_INFO "Reserving virtual address space above 0x%08x\n",
(int)-reserve);
__FIXADDR_TOP = -reserve - PAGE_SIZE;
__VMALLOC_RESERVE += reserve;
}
/*
* vmalloc=size forces the vmalloc area to be exactly 'size'
* bytes. This can be used to increase (or decrease) the
* vmalloc area - the default is 128m.
*/
static int __init parse_vmalloc(char *arg)
{
if (!arg)
return -EINVAL;
/* Add VMALLOC_OFFSET to the parsed value due to vm area guard hole*/
__VMALLOC_RESERVE = memparse(arg, &arg) + VMALLOC_OFFSET;
return 0;
}
early_param("vmalloc", parse_vmalloc);
__VMALLOC_RESERVE will be overwriten by vmalloc=...
you may need to split reserve_top_address() to two functions...
YH
next prev parent reply other threads:[~2008-12-11 0:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-10 0:50 [PATCH] Fix VMI crash on boot in 2.6.27+ kernels Zachary Amsden
2008-12-10 0:44 ` Greg KH
2008-12-10 7:30 ` Zachary Amsden
2008-12-10 1:15 ` Yinghai Lu
2008-12-10 1:48 ` H. Peter Anvin
2008-12-10 7:31 ` Zachary Amsden
2008-12-10 9:05 ` H. Peter Anvin
2008-12-10 7:36 ` Zachary Amsden
2008-12-11 0:06 ` Zachary Amsden
2008-12-11 0:20 ` Yinghai Lu [this message]
2008-12-11 3:31 ` Greg KH
2008-12-11 22:23 ` [PATCH] Fix VMI crash on boot in 2.6.27, 2.6.28 kernels Zachary Amsden
2008-12-11 21:45 ` Greg KH
2008-12-11 23:37 ` H. Peter Anvin
2008-12-12 5:37 ` Zachary Amsden
2008-12-11 5:44 ` [PATCH] Fix VMI crash on boot in 2.6.27+ kernels Zachary Amsden
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=49405CB6.6010006@kernel.org \
--to=yinghai@kernel.org \
--cc="bruno .premont"@restena.lu \
--cc=akpm@linux-foundation.org \
--cc=alokkataria1@gmail.com \
--cc=dsd@gentoo.org \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=norman@thebacks.co.uk \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=xl@xlsigned.net \
--cc=ying.huang@intel.com \
--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