From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH]: Allow tools to map arbitrarily large machphys_mfn_list on 32bit dom0 Date: Mon, 14 Mar 2011 15:08:57 +0000 Message-ID: References: <1300115112.17229.78.camel@qabil.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1300115112.17229.78.camel@qabil.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gianni Tedesco , Ian Campbell Cc: Tim Deegan , Xen Devel , Jan Beulich List-Id: xen-devel@lists.xenproject.org Cc'ing Jan. I'd appreciate his Ack as this is his code originally. I don't think we're missing anything subtle though. -- Keir On 14/03/2011 15:05, "Gianni Tedesco" wrote: > This permits suspend/resume to work with 32bit dom0/tools. AFAICT the > limit to MACH2PHYS_COMPAT_NR_ENTRIES is redundant since that refers to a > limit in kernel mappings under 32bit hypervisors, not userspace where > there may be gigabytes of useful virtual space for this. > > Suggested-by: Ian Campbell > Signed-off-by: Gianni Tedesco > > diff -r cf558cb8b92b xen/arch/x86/x86_64/compat/mm.c > --- a/xen/arch/x86/x86_64/compat/mm.c Mon Mar 07 17:52:44 2011 +0000 > +++ b/xen/arch/x86/x86_64/compat/mm.c Mon Mar 14 14:58:04 2011 +0000 > @@ -162,8 +162,7 @@ int compat_arch_memory_op(int op, XEN_GU > return -EFAULT; > > limit = (unsigned long)(compat_machine_to_phys_mapping + > - min_t(unsigned long, max_page, > - MACH2PHYS_COMPAT_NR_ENTRIES(current->domain))); > + (unsigned long)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; > >