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 hvm domain builder, restore: set shar

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 hvm domain builder, restore: set shared_info.arch.max_pfn for
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Feb 2007 03:50:20 -0800
Delivery-date: Mon, 26 Feb 2007 04:21:04 -0800
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 Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1172326745 0
# Node ID aa1be6f5150e609585d1d404c364b76de95a632b
# Parent  6c938630de54277aebdbb73f88fcbc71643c319e
x86 hvm domain builder, restore: set shared_info.arch.max_pfn for
dump-core to know the area to dump

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 tools/libxc/xc_hvm_build.c   |    1 +
 tools/libxc/xc_hvm_restore.c |   11 +++++++++++
 2 files changed, 12 insertions(+)

diff -r 6c938630de54 -r aa1be6f5150e tools/libxc/xc_hvm_build.c
--- a/tools/libxc/xc_hvm_build.c        Sat Feb 24 14:10:27 2007 +0000
+++ b/tools/libxc/xc_hvm_build.c        Sat Feb 24 14:19:05 2007 +0000
@@ -262,6 +262,7 @@ static int setup_guest(int xc_handle,
     /* NB. evtchn_upcall_mask is unused: leave as zero. */
     memset(&shared_info->evtchn_mask[0], 0xff,
            sizeof(shared_info->evtchn_mask));
+    shared_info->arch.max_pfn = page_array[nr_pages - 1];
     munmap(shared_info, PAGE_SIZE);
 
     if ( v_end > HVM_BELOW_4G_RAM_END )
diff -r 6c938630de54 -r aa1be6f5150e tools/libxc/xc_hvm_restore.c
--- a/tools/libxc/xc_hvm_restore.c      Sat Feb 24 14:10:27 2007 +0000
+++ b/tools/libxc/xc_hvm_restore.c      Sat Feb 24 14:19:05 2007 +0000
@@ -86,6 +86,8 @@ int xc_hvm_restore(int xc_handle, int io
     uint8_t *hvm_buf = NULL;
     unsigned long long v_end, memsize;
     unsigned long shared_page_nr;
+    shared_info_t *shared_info = NULL;
+    xen_pfn_t arch_max_pfn;
 
     unsigned long pfn;
     unsigned int prev_pc, this_pc;
@@ -141,6 +143,7 @@ int xc_hvm_restore(int xc_handle, int io
         pfns[i] = i;
     for ( i = HVM_BELOW_4G_RAM_END >> PAGE_SHIFT; i < max_pfn; i++ )
         pfns[i] += HVM_BELOW_4G_MMIO_LENGTH >> PAGE_SHIFT;
+    arch_max_pfn = pfns[max_pfn - 1];/* used later */
 
     /* Allocate memory for HVM guest, skipping VGA hole 0xA0000-0xC0000. */
     rc = xc_domain_memory_populate_physmap(
@@ -350,6 +353,14 @@ int xc_hvm_restore(int xc_handle, int io
         ERROR("setting the shared-info pfn failed!\n");
         goto out;
     }
+    if ( (xc_memory_op(xc_handle, XENMEM_add_to_physmap, &xatp) != 0) ||
+         ((shared_info = xc_map_foreign_range(
+             xc_handle, dom, PAGE_SIZE, PROT_READ | PROT_WRITE,
+             shared_info_frame)) == NULL) )
+        goto out;
+    /* shared_info.arch.max_pfn is used by dump-core */
+    shared_info->arch.max_pfn = arch_max_pfn;
+    munmap(shared_info, PAGE_SIZE);
 
     rc = 0;
     goto out;

_______________________________________________
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 hvm domain builder, restore: set shared_info.arch.max_pfn for, Xen patchbot-unstable <=