aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/Kconfig
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-08-27 16:28:48 -0400
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-10-22 15:57:24 -0400
commit58e05027b530ff081ecea68e38de8d59db8f87e0 (patch)
tree0e9a6649898ea44ee168b6c111c92c8668661e15 /arch/x86/xen/Kconfig
parentbbbf61eff92c7c236f57ee1953ad84055443717e (diff)
xen: convert p2m to a 3 level tree
Make the p2m structure a 3 level tree which covers the full possible physical space. The p2m structure contains mappings from the domain's pfns to system-wide mfns. The structure has 3 levels and two roots. The first root is for the domain's own use, and is linked with virtual addresses. The second is all mfn references, and is used by Xen on save/restore to allow it to update the p2m mapping for the domain. At boot, the domain builder provides a simple flat p2m array for all the initially present pages. We construct the two levels above that using the early_brk allocator. After early boot time, set_phys_to_machine() will allocate any missing levels using the normal kernel allocator (at GFP_KERNEL, so it must be called in a normal blocking context). Because the early_brk() API requires us to pre-reserve the maximum amount of memory we could allocate, there is still a CONFIG_XEN_MAX_DOMAIN_MEMORY config option, but its only negative side-effect is to increase the kernel's apparent bss size. However, since all unused brk memory is returned to the heap, there's no real downside to making it large. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86/xen/Kconfig')
-rw-r--r--arch/x86/xen/Kconfig11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
index 68128a1b401a..90a7f5ad6916 100644
--- a/arch/x86/xen/Kconfig
+++ b/arch/x86/xen/Kconfig
@@ -19,15 +19,12 @@ config XEN_PVHVM
19 depends on X86_LOCAL_APIC 19 depends on X86_LOCAL_APIC
20 20
21config XEN_MAX_DOMAIN_MEMORY 21config XEN_MAX_DOMAIN_MEMORY
22 int "Maximum allowed size of a domain in gigabytes" 22 int
23 default 8 if X86_32 23 default 128
24 default 32 if X86_64
25 depends on XEN 24 depends on XEN
26 help 25 help
27 The pseudo-physical to machine address array is sized 26 This only affects the sizing of some bss arrays, the unused
28 according to the maximum possible memory size of a Xen 27 portions of which are freed.
29 domain. This array uses 1 page per gigabyte, so there's no
30 need to be too stingy here.
31 28
32config XEN_SAVE_RESTORE 29config XEN_SAVE_RESTORE
33 bool 30 bool