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] [IA64] memmap: dump-core: enable ia64 mem

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] memmap: dump-core: enable ia64 memory map code
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 16 Jun 2007 05:35:03 -0700
Delivery-date: Sat, 16 Jun 2007 05:33:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Alex Williamson <alex.williamson@xxxxxx>
# Date 1179778167 21600
# Node ID 6450f6287898ea5b2e7420647bf13cf709f949ce
# Parent  fc49dbce4868e01c0d7fb3dee16e242160d9986e
[IA64] memmap: dump-core: enable ia64 memory map code

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 tools/libxc/xc_core_ia64.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff -r fc49dbce4868 -r 6450f6287898 tools/libxc/xc_core_ia64.c
--- a/tools/libxc/xc_core_ia64.c        Mon May 21 14:08:19 2007 -0600
+++ b/tools/libxc/xc_core_ia64.c        Mon May 21 14:09:27 2007 -0600
@@ -163,20 +163,23 @@ xc_core_arch_memory_map_get(int xc_handl
                             xc_core_memory_map_t **mapp,
                             unsigned int *nr_entries)
 {
-#ifdef notyet
     int ret = -1;
     xen_ia64_memmap_info_t *memmap_info;
+    unsigned long map_size;
     xc_core_memory_map_t *map;
     char *start;
     char *end;
     char *p;
     efi_memory_desc_t *md;
 
-    if  ( live_shinfo == NULL || live_shinfo->arch.memmap_info_pfn == 0 )
+    if  ( live_shinfo == NULL ||
+          live_shinfo->arch.memmap_info_num_pages == 0 ||
+          live_shinfo->arch.memmap_info_pfn == 0 )
         goto old;
 
+    map_size = PAGE_SIZE * live_shinfo->arch.memmap_info_num_pages;
     memmap_info = xc_map_foreign_range(xc_handle, info->domid,
-                                       PAGE_SIZE, PROT_READ,
+                                       map_size, PROT_READ,
                                        live_shinfo->arch.memmap_info_pfn);
     if ( memmap_info == NULL )
     {
@@ -185,7 +188,7 @@ xc_core_arch_memory_map_get(int xc_handl
     }
     if ( memmap_info->efi_memdesc_size != sizeof(*md) ||
          (memmap_info->efi_memmap_size / memmap_info->efi_memdesc_size) == 0 ||
-         memmap_info->efi_memmap_size > PAGE_SIZE - sizeof(memmap_info) ||
+         memmap_info->efi_memmap_size > map_size - sizeof(memmap_info) ||
          memmap_info->efi_memdesc_version != EFI_MEMORY_DESCRIPTOR_VERSION )
     {
         PERROR("unknown memmap header. defaulting to compat mode.");
@@ -219,12 +222,11 @@ xc_core_arch_memory_map_get(int xc_handl
     }
     ret = 0;
 out:
-    munmap(memmap_info, PAGE_SIZE);
+    munmap(memmap_info, map_size);
     qsort(map, *nr_entries, sizeof(map[0]), &xc_memory_map_cmp);
     return ret;
     
 old:
-#endif
     return memory_map_get_old(xc_handle, info, live_shinfo, mapp, nr_entries);
 }
 

_______________________________________________
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] [IA64] memmap: dump-core: enable ia64 memory map code, Xen patchbot-unstable <=