Commit 0e24e36b authored by Gianni Tedesco's avatar Gianni Tedesco

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: default avatarIan Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: default avatarGianni Tedesco <gianni.tedesco@citrix.com>
parent 7a8388ec
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment