Re: [PATCH] reserve end-of-conventional-memory to 1MB, 64-bit, use paravirt_enabled

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alexander van Heukelum
Date: Tuesday, March 4, 2008 - 12:12 pm

Jeremy Fitzhardinge pointed out that looking at the boot_params
struct to determine if the system is running in a paravirtual
environment is not reliable for the Xen case, currently. He also
points out that there already exists a function to determine if
the system is running in a paravirtual environment. So let's use
that instead. This gets rid of the preprocessor test too.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>

---

Same, for 64 bit.

Greetings,
	Alexander

diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 269a6b4..48be76c 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -72,12 +72,8 @@ static void __init reserve_ebda_region(void)
 	/* that area is absent. We'll just have to assume */
 	/* that the paravirt case can handle memory setup */
 	/* correctly, without our help. */
-#ifdef CONFIG_PARAVIRT
-	if ((boot_params.hdr.version >= 0x207) &&
-			(boot_params.hdr.hardware_subarch != 0)) {
+	if (paravirt_enabled())
 		return;
-	}
-#endif
 
 	/* end of low (conventional) memory */
 	lowmem = *(unsigned short *)__va(BIOS_LOWMEM_KILOBYTES);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fix alignment of early reservation for EBDA, Alexander van Heukelum, (Sun Feb 24, 10:46 am)
Re: [PATCH] Fix alignment of early reservation for EBDA, Ingo Molnar, (Sun Feb 24, 12:41 pm)
Re: [PATCH] Fix alignment of early reservation for EBDA, Alexander van Heukelum, (Sun Feb 24, 1:53 pm)
Re: [PATCH] Fix alignment of early reservation for EBDA, H. Peter Anvin, (Sun Feb 24, 7:18 pm)
Re: [PATCH] Fix alignment of early reservation for EBDA, Alexander van Heukelum, (Mon Feb 25, 9:54 am)
Re: [PATCH] Fix alignment of early reservation for EBDA, Ingo Molnar, (Mon Feb 25, 10:01 am)
[PATCH] reserve_early end-of-conventional-memory to 1MB, Alexander van Heukelum, (Mon Feb 25, 11:07 am)
Re: [PATCH] reserve_early end-of-conventional-memory to 1MB, H. Peter Anvin, (Mon Feb 25, 11:13 am)
Re: [PATCH] reserve_early end-of-conventional-memory to 1MB, Alexander van Heukelum, (Mon Feb 25, 12:46 pm)
Re: [PATCH] reserve_early end-of-conventional-memory to 1M ..., Alexander van Heukelum, (Wed Feb 27, 1:01 pm)
[PATCH] reserve end-of-conventional-memory to 1MB on 32-bit, Alexander van Heukelum, (Thu Feb 28, 6:13 am)
[RFC] use realmode code to reserve end-of-conventional-mem ..., Alexander van Heukelum, (Thu Feb 28, 6:28 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB on 3 ..., Alexander van Heukelum, (Fri Feb 29, 4:49 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB on 3 ..., Alexander van Heukelum, (Fri Feb 29, 11:38 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB on 3 ..., Alexander van Heukelum, (Fri Feb 29, 11:56 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB on 3 ..., Alexander van Heukelum, (Fri Feb 29, 3:26 pm)
Re: [PATCH] reserve end-of-conventional-memory to 1MB on 3 ..., Alexander van Heukelum, (Sat Mar 1, 9:09 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB on 6 ..., Alexander van Heukelum, (Sat Mar 1, 9:12 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB on 3 ..., Alexander van Heukelum, (Tue Mar 4, 6:31 am)
Re: [RFC] use realmode code to reserve end-of-conventional ..., Jeremy Fitzhardinge, (Tue Mar 4, 8:13 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB on 3 ..., Jeremy Fitzhardinge, (Tue Mar 4, 8:18 am)
Re: [RFC] use realmode code to reserve end-of-conventional ..., Jeremy Fitzhardinge, (Tue Mar 4, 9:02 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB on 3 ..., Alexander van Heukelum, (Tue Mar 4, 9:51 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB on 3 ..., Jeremy Fitzhardinge, (Tue Mar 4, 10:11 am)
Re: [RFC] use realmode code to reserve end-of-conventional ..., Jeremy Fitzhardinge, (Tue Mar 4, 10:44 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB, 32- ..., Alexander van Heukelum, (Tue Mar 4, 11:57 am)
Re: [PATCH] reserve end-of-conventional-memory to 1MB, 64- ..., Alexander van Heukelum, (Tue Mar 4, 12:12 pm)
Re: [RFC] use realmode code to reserve end-of-conventional ..., Jeremy Fitzhardinge, (Wed Mar 5, 9:38 am)
Re: [RFC] use realmode code to reserve end-of-conventional ..., Jeremy Fitzhardinge, (Wed Mar 5, 10:28 am)