diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-01-23 14:15:16 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-01-23 14:15:16 +0100 |
commit | adc5afbf1c70ef55c260fb93e4b8ce5ccb918706 (patch) | |
tree | 2893064bbbb1e457fba52be6eadc8587a8497761 /xen/arch/x86/x86_64/mm.c | |
parent | 53a4e820f2888b1c7fcac6cc65c5ce854a2ff1ea (diff) | |
download | xen-adc5afbf1c70ef55c260fb93e4b8ce5ccb918706.tar.gz xen-adc5afbf1c70ef55c260fb93e4b8ce5ccb918706.tar.bz2 xen-adc5afbf1c70ef55c260fb93e4b8ce5ccb918706.zip |
x86: support up to 16Tb
This mainly involves adjusting the number of L4 entries needing copying
between page tables (which is now different between PV and HVM/idle
domains), and changing the cutoff point and method when more than the
supported amount of memory is found in a system.
Since TMEM doesn't currently cope with the full 1:1 map not always
being visible, it gets forcefully disabled in that case.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Diffstat (limited to 'xen/arch/x86/x86_64/mm.c')
-rw-r--r-- | xen/arch/x86/x86_64/mm.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c index bdf042de9e..aae69e0799 100644 --- a/xen/arch/x86/x86_64/mm.c +++ b/xen/arch/x86/x86_64/mm.c @@ -1471,10 +1471,23 @@ int memory_add(unsigned long spfn, unsigned long epfn, unsigned int pxm) return -EINVAL; } - ret = map_pages_to_xen((unsigned long)mfn_to_virt(spfn), spfn, - epfn - spfn, PAGE_HYPERVISOR); - if ( ret ) - return ret; + i = virt_to_mfn(HYPERVISOR_VIRT_END - 1) + 1; + if ( spfn < i ) + { + ret = map_pages_to_xen((unsigned long)mfn_to_virt(spfn), spfn, + min(epfn, i) - spfn, PAGE_HYPERVISOR); + if ( ret ) + return ret; + } + if ( i < epfn ) + { + if ( i < spfn ) + i = spfn; + ret = map_pages_to_xen((unsigned long)mfn_to_virt(i), i, + epfn - i, __PAGE_HYPERVISOR); + if ( ret ) + return ret; + } old_node_start = NODE_DATA(node)->node_start_pfn; old_node_span = NODE_DATA(node)->node_spanned_pages; |