debuggers.hg
changeset 20938:d311d1efc25e
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@novell.com>
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@novell.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu Feb 04 08:53:49 2010 +0000 (2010-02-04) |
parents | 91358472d8c4 |
children | 845d04d505d0 |
files | xen/arch/x86/mm.c |
line diff
1.1 --- a/xen/arch/x86/mm.c Thu Feb 04 08:53:16 2010 +0000 1.2 +++ b/xen/arch/x86/mm.c Thu Feb 04 08:53:49 2010 +0000 1.3 @@ -4456,12 +4456,14 @@ long arch_memory_op(int op, XEN_GUEST_HA 1.4 1.5 case XENMEM_machphys_mapping: 1.6 { 1.7 - static const struct xen_machphys_mapping mapping = { 1.8 + struct xen_machphys_mapping mapping = { 1.9 .v_start = MACH2PHYS_VIRT_START, 1.10 .v_end = MACH2PHYS_VIRT_END, 1.11 .max_mfn = MACH2PHYS_NR_ENTRIES - 1 1.12 }; 1.13 1.14 + if ( !mem_hotplug ) 1.15 + mapping.max_mfn = max_page - 1; 1.16 if ( copy_to_guest(arg, &mapping, 1) ) 1.17 return -EFAULT; 1.18