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@valinux.co.jp>
This commit is contained in:
Keir Fraser committed 2007-02-24 14:19:05 +00:00
1 parent da97fcd329
commit 7a439455bd
2 files changed
+12

No files matched your search

+1
View File
@@ -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 )
+11
View File
@@ -86,6 +86,8 @@ int xc_hvm_restore(int xc_handle, int io_fd,
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_fd,
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_fd,
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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.