WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: make max_mfn returned from XENMEM_ma

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: make max_mfn returned from XENMEM_machphys_mapping dynamic
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Feb 2010 01:15:11 -0800
Delivery-date: Thu, 04 Feb 2010 01:16:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1265273629 0
# Node ID d311d1efc25e3d270c0b7f14bd4d43bbfbcb35dd
# Parent  91358472d8c40b25ac0704c2c1c3d86515952a22
x86: make max_mfn returned from XENMEM_machphys_mapping dynamic

This helps debugging in the guest kernels, as then MFNs there can then
be range checked based on the reported value.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/mm.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 91358472d8c4 -r d311d1efc25e xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Thu Feb 04 08:53:16 2010 +0000
+++ b/xen/arch/x86/mm.c Thu Feb 04 08:53:49 2010 +0000
@@ -4456,12 +4456,14 @@ long arch_memory_op(int op, XEN_GUEST_HA
 
     case XENMEM_machphys_mapping:
     {
-        static const struct xen_machphys_mapping mapping = {
+        struct xen_machphys_mapping mapping = {
             .v_start = MACH2PHYS_VIRT_START,
             .v_end   = MACH2PHYS_VIRT_END,
             .max_mfn = MACH2PHYS_NR_ENTRIES - 1
         };
 
+        if ( !mem_hotplug )
+            mapping.max_mfn = max_page - 1;
         if ( copy_to_guest(arg, &mapping, 1) )
             return -EFAULT;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: make max_mfn returned from XENMEM_machphys_mapping dynamic, Xen patchbot-unstable <=