* [PATCH 1/6] dump-core take 7: hvm domain: set shared_info.arch.max_pfn
@ 2007-02-19 8:23 Isaku Yamahata
0 siblings, 0 replies; only message in thread
From: Isaku Yamahata @ 2007-02-19 8:23 UTC (permalink / raw)
To: xen-devel; +Cc: Isaku Yamahata, John Levon, Dave Anderson, xen-ia64-devel
[-- Attachment #1: Type: text/plain, Size: 9 bytes --]
1 / 6
[-- Attachment #2: 13988_0e8f4ceae602_x86_hvm_domain_builder_set_max_pfn.patch --]
[-- Type: text/x-diff, Size: 2378 bytes --]
# HG changeset patch
# User yamahata@valinux.co.jp
# Date 1171527690 -32400
# Node ID 0e8f4ceae60294176d0c555ec2ef673145791a06
# Parent f5f232aef7bdfabd4997f45d88620dc45b50c185
x86 hvm domain builder, restore: set shared_info.arch.max_pfn for dump-core
to know the area to dump
PATCHNAME: x86_hvm_domain_builder_set_max_pfn
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
diff -r f5f232aef7bd -r 0e8f4ceae602 tools/libxc/xc_hvm_build.c
--- a/tools/libxc/xc_hvm_build.c Mon Feb 19 16:49:12 2007 +0900
+++ b/tools/libxc/xc_hvm_build.c Thu Feb 15 17:21:30 2007 +0900
@@ -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 f5f232aef7bd -r 0e8f4ceae602 tools/libxc/xc_hvm_restore.c
--- a/tools/libxc/xc_hvm_restore.c Mon Feb 19 16:49:12 2007 +0900
+++ b/tools/libxc/xc_hvm_restore.c Thu Feb 15 17:21:30 2007 +0900
@@ -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;
@@ -144,6 +146,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;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-19 8:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19 8:23 [PATCH 1/6] dump-core take 7: hvm domain: set shared_info.arch.max_pfn Isaku Yamahata
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.