diff options
author | Gianni Tedesco <gianni.tedesco@citrix.com> | 2011-03-14 17:14:16 +0000 |
---|---|---|
committer | Gianni Tedesco <gianni.tedesco@citrix.com> | 2011-03-14 17:14:16 +0000 |
commit | 3eaffa9fab122ec9e4d2d9cc9645ca67db75dee8 (patch) | |
tree | 8dd71e39572fb4ee5d5e9eb634fcc56dafd996f5 | |
parent | 1d5d9a3590ba6fe78c7598c6c14f23dacdd0db31 (diff) | |
download | xen-3eaffa9fab122ec9e4d2d9cc9645ca67db75dee8.tar.gz xen-3eaffa9fab122ec9e4d2d9cc9645ca67db75dee8.tar.bz2 xen-3eaffa9fab122ec9e4d2d9cc9645ca67db75dee8.zip |
Allow tools to map arbitrarily large machphys_mfn_list on 32bit dom0
This permits suspend/resume to work with 32bit dom0/tools when system
memory extends beyond 160GB (and up to 1TB).
AFAICT the limit to MACH2PHYS_COMPAT_NR_ENTRIES is redundant since
that refers to a limit in 32bit guest compat mappings under 64bit
hypervisors, not userspace where there may be gigabytes of useful
virtual space available for this.
Suggested-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
xen-unstable changeset: 23038:39f5947b1576
xen-unstable date: Mon Mar 14 17:13:15 2011 +0000
-rw-r--r-- | xen/arch/x86/x86_64/compat/mm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/xen/arch/x86/x86_64/compat/mm.c b/xen/arch/x86/x86_64/compat/mm.c index f567aabab8..2c050997b6 100644 --- a/xen/arch/x86/x86_64/compat/mm.c +++ b/xen/arch/x86/x86_64/compat/mm.c @@ -161,9 +161,7 @@ int compat_arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg) if ( copy_from_guest(&xmml, arg, 1) ) return -EFAULT; - limit = (unsigned long)(compat_machine_to_phys_mapping + - min_t(unsigned long, max_page, - MACH2PHYS_COMPAT_NR_ENTRIES(current->domain))); + limit = (unsigned long)(compat_machine_to_phys_mapping + max_page); if ( limit > RDWR_COMPAT_MPT_VIRT_END ) limit = RDWR_COMPAT_MPT_VIRT_END; for ( i = 0, v = RDWR_COMPAT_MPT_VIRT_START, last_mfn = 0; |