This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] [PATCH]: Allow tools to map arbitrarily large machphys_mfn_l

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]: Allow tools to map arbitrarily large machphys_mfn_list on 32bit dom0
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Mon, 14 Mar 2011 15:05:12 +0000
Cc: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, Keir, Fraser <keir.fraser@xxxxxxx>, Keir Fraser <keir.xen@xxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 14 Mar 2011 08:07:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1300098009.17339.2110.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C9A026BF.14A37%keir.xen@xxxxxxxxx> <1300098009.17339.2110.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 <Ian.Campbell@xxxxxxxxxxxxx>
Signed-off-by: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>

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;

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>