* [PATCH 5/5] Create a hole in high linear address space
@ 2005-08-24 18:45 Zachary Amsden
2005-08-24 20:19 ` Chris Wright
0 siblings, 1 reply; 4+ messages in thread
From: Zachary Amsden @ 2005-08-24 18:45 UTC (permalink / raw)
To: Andrew Morton, Linux Kernel Mailing List,
Virtualization Mailing List, H. Peter Anvin, Zwane Mwaikambo,
Chris Wright, Martin Bligh, Pratap Subrahmanyam, Christopher Li,
Zachary Amsden
Allow compile time creation of a hole at the high end of linear address space.
This makes accomodating a hypervisor a much more tractable problem by giving
it ample playground to live in. Currently, the hole size is fixed at config
time; I have experimented with dynamically sized holes, and have a later
patch that developes this potential, but it becomes much more useful once
the exact negotiation of linear address space with the hypervisor is defined.
The fixed compile time solution is sufficient for now.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.13/arch/i386/Kconfig
===================================================================
--- linux-2.6.13.orig/arch/i386/Kconfig 2005-08-24 09:30:49.000000000 -0700
+++ linux-2.6.13/arch/i386/Kconfig 2005-08-24 09:58:56.000000000 -0700
@@ -803,6 +803,14 @@ config ARCH_SELECT_MEMORY_MODEL
def_bool y
depends on ARCH_SPARSEMEM_ENABLE
+config MEMORY_HOLE
+ int "Create hole at top of memory (0-512 MB)"
+ range 0 512
+ default "0"
+ help
+ Useful for creating a hole in the top of memory when running
+ inside of a virtual machine monitor.
+
source "mm/Kconfig"
config HAVE_ARCH_EARLY_PFN_TO_NID
Index: linux-2.6.13/include/asm-i386/fixmap.h
===================================================================
--- linux-2.6.13.orig/include/asm-i386/fixmap.h 2005-08-24 09:30:43.000000000 -0700
+++ linux-2.6.13/include/asm-i386/fixmap.h 2005-08-24 10:04:42.000000000 -0700
@@ -20,7 +20,7 @@
* Leave one empty page between vmalloc'ed areas and
* the start of the fixmap.
*/
-#define __FIXADDR_TOP 0xfffff000
+#define __FIXADDR_TOP (0xfffff000-(CONFIG_MEMORY_HOLE << 20))
#ifndef __ASSEMBLY__
#include <linux/kernel.h>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 5/5] Create a hole in high linear address space
2005-08-24 18:45 [PATCH 5/5] Create a hole in high linear address space Zachary Amsden
@ 2005-08-24 20:19 ` Chris Wright
2005-08-24 21:18 ` Zachary Amsden
0 siblings, 1 reply; 4+ messages in thread
From: Chris Wright @ 2005-08-24 20:19 UTC (permalink / raw)
To: Zachary Amsden
Cc: Andrew Morton, Linux Kernel Mailing List,
Virtualization Mailing List, H. Peter Anvin, Zwane Mwaikambo,
Chris Wright, Martin Bligh, Pratap Subrahmanyam, Christopher Li
* Zachary Amsden (zach@vmware.com) wrote:
> Allow compile time creation of a hole at the high end of linear address space.
> This makes accomodating a hypervisor a much more tractable problem by giving
> it ample playground to live in. Currently, the hole size is fixed at config
> time; I have experimented with dynamically sized holes, and have a later
> patch that developes this potential, but it becomes much more useful once
> the exact negotiation of linear address space with the hypervisor is defined.
>
> The fixed compile time solution is sufficient for now.
Xen moves __FIXADDR_TOP like this:
#ifdef CONFIG_X86_PAE
# define HYPERVISOR_VIRT_START (0xF5800000UL)
#else
# define HYPERVISOR_VIRT_START (0xFC000000UL)
#endif
and
#define __FIXADDR_TOP (HYPERVISOR_VIRT_START - 2 * PAGE_SIZE)
and also adds bits to fixmap.
So this proposed mechanism isn't quite good enough.
thanks,
-chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 5/5] Create a hole in high linear address space
2005-08-24 20:19 ` Chris Wright
@ 2005-08-24 21:18 ` Zachary Amsden
2005-08-24 21:28 ` Chris Wright
0 siblings, 1 reply; 4+ messages in thread
From: Zachary Amsden @ 2005-08-24 21:18 UTC (permalink / raw)
To: Chris Wright
Cc: Andrew Morton, Linux Kernel Mailing List,
Virtualization Mailing List, H. Peter Anvin, Zwane Mwaikambo,
Martin Bligh, Pratap Subrahmanyam, Christopher Li
Chris Wright wrote:
>* Zachary Amsden (zach@vmware.com) wrote:
>
>
>>Allow compile time creation of a hole at the high end of linear address space.
>>This makes accomodating a hypervisor a much more tractable problem by giving
>>it ample playground to live in. Currently, the hole size is fixed at config
>>time; I have experimented with dynamically sized holes, and have a later
>>patch that developes this potential, but it becomes much more useful once
>>the exact negotiation of linear address space with the hypervisor is defined.
>>
>>The fixed compile time solution is sufficient for now.
>>
>>
>
>Xen moves __FIXADDR_TOP like this:
>
>#ifdef CONFIG_X86_PAE
># define HYPERVISOR_VIRT_START (0xF5800000UL)
>#else
># define HYPERVISOR_VIRT_START (0xFC000000UL)
>#endif
>
>and
>
>#define __FIXADDR_TOP (HYPERVISOR_VIRT_START - 2 * PAGE_SIZE)
>
>and also adds bits to fixmap.
>
>So this proposed mechanism isn't quite good enough.
>
>
Hmm. I was thinking it would be compile time variable with defaults -- like
config MEMORY_HOLE
int "Create hole at top of memory (0-512 MB)"
range 0 512
default "0"
default 168 if (CONFIG_X86_PAE && CONFIG_X86_HYPERVISOR)
default 64 if (!CONFIG_X86_PAE && CONFIG_X86_HYPERVISOR)
help
Useful for creating a hole in the top of memory when running
inside of a virtual machine monitor.
Adding things to the fixmap is a separate concept, thus a separate patch ;)
Zach
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 5/5] Create a hole in high linear address space
2005-08-24 21:18 ` Zachary Amsden
@ 2005-08-24 21:28 ` Chris Wright
0 siblings, 0 replies; 4+ messages in thread
From: Chris Wright @ 2005-08-24 21:28 UTC (permalink / raw)
To: Zachary Amsden
Cc: Chris Wright, Andrew Morton, Linux Kernel Mailing List,
Virtualization Mailing List, H. Peter Anvin, Zwane Mwaikambo,
Martin Bligh, Pratap Subrahmanyam, Christopher Li
* Zachary Amsden (zach@vmware.com) wrote:
> Hmm. I was thinking it would be compile time variable with defaults -- like
>
> config MEMORY_HOLE
> int "Create hole at top of memory (0-512 MB)"
> range 0 512
> default "0"
> default 168 if (CONFIG_X86_PAE && CONFIG_X86_HYPERVISOR)
> default 64 if (!CONFIG_X86_PAE && CONFIG_X86_HYPERVISOR)
That's fine, I had done some braindead math anyway ;-)
> help
> Useful for creating a hole in the top of memory when running
> inside of a virtual machine monitor.
>
> Adding things to the fixmap is a separate concept, thus a separate patch ;)
Sure, good point.
thanks,
-chris
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-08-24 21:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-24 18:45 [PATCH 5/5] Create a hole in high linear address space Zachary Amsden
2005-08-24 20:19 ` Chris Wright
2005-08-24 21:18 ` Zachary Amsden
2005-08-24 21:28 ` Chris Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox