[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] Fix xm dump-core with vti domain
# HG changeset patch # User Alex Williamson <alex.williamson@xxxxxx> # Date 1175786329 21600 # Node ID 3c8039aa5004c5b29b01b23b77c9c261ee005d9f # Parent 770c465344d3d2a476a6e31f2511bfab353b0786 [IA64] Fix xm dump-core with vti domain Share privregs with domain and assign it to pseudo physical address space as para virtualized domain. Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> --- tools/libxc/xc_core_ia64.c | 1 + xen/arch/ia64/vmx/vmx_init.c | 1 + xen/arch/ia64/xen/domain.c | 36 ++++++++++++++++++++++-------------- xen/include/asm-ia64/domain.h | 1 + 4 files changed, 25 insertions(+), 14 deletions(-) diff -r 770c465344d3 -r 3c8039aa5004 tools/libxc/xc_core_ia64.c --- a/tools/libxc/xc_core_ia64.c Thu Apr 05 09:13:16 2007 -0600 +++ b/tools/libxc/xc_core_ia64.c Thu Apr 05 09:18:49 2007 -0600 @@ -93,6 +93,7 @@ memory_map_get_old_hvm(int xc_handle, xc {IO_PAGE_START, IO_PAGE_SIZE}, {STORE_PAGE_START, STORE_PAGE_SIZE}, {BUFFER_IO_PAGE_START, BUFFER_IO_PAGE_SIZE}, + {BUFFER_PIO_PAGE_START, BUFFER_PIO_PAGE_SIZE}, {GFW_START, GFW_SIZE}, }; const unsigned int nr_gfw_map = sizeof(gfw_map)/sizeof(gfw_map[0]); diff -r 770c465344d3 -r 3c8039aa5004 xen/arch/ia64/vmx/vmx_init.c --- a/xen/arch/ia64/vmx/vmx_init.c Thu Apr 05 09:13:16 2007 -0600 +++ b/xen/arch/ia64/vmx/vmx_init.c Thu Apr 05 09:18:49 2007 -0600 @@ -301,6 +301,7 @@ vmx_final_setup_guest(struct vcpu *v) ASSERT(vpd); v->arch.privregs = (mapped_regs_t *)vpd; + vcpu_share_privregs_with_guest(v); vpd->vpd_low.virt_env_vaddr = vm_buffer; /* Per-domain vTLB and vhpt implementation. Now vmx domain will stick diff -r 770c465344d3 -r 3c8039aa5004 xen/arch/ia64/xen/domain.c --- a/xen/arch/ia64/xen/domain.c Thu Apr 05 09:13:16 2007 -0600 +++ b/xen/arch/ia64/xen/domain.c Thu Apr 05 09:18:49 2007 -0600 @@ -446,22 +446,11 @@ int vcpu_initialise(struct vcpu *v) return 0; } -int vcpu_late_initialise(struct vcpu *v) +void vcpu_share_privregs_with_guest(struct vcpu *v) { struct domain *d = v->domain; - int rc, order, i; - - if (HAS_PERVCPU_VHPT(d)) { - rc = pervcpu_vhpt_alloc(v); - if (rc != 0) - return rc; - } - - /* Create privregs page. */ - order = get_order_from_shift(XMAPPEDREGS_SHIFT); - v->arch.privregs = alloc_xenheap_pages(order); - BUG_ON(v->arch.privregs == NULL); - memset(v->arch.privregs, 0, 1 << XMAPPEDREGS_SHIFT); + int i, order = get_order_from_shift(XMAPPEDREGS_SHIFT); + for (i = 0; i < (1 << order); i++) share_xen_page_with_guest(virt_to_page(v->arch.privregs) + i, d, XENSHARE_writable); @@ -474,6 +463,25 @@ int vcpu_late_initialise(struct vcpu *v) for (i = 0; i < XMAPPEDREGS_SIZE; i += PAGE_SIZE) assign_domain_page(d, IA64_XMAPPEDREGS_PADDR(v->vcpu_id) + i, virt_to_maddr(v->arch.privregs + i)); +} + +int vcpu_late_initialise(struct vcpu *v) +{ + struct domain *d = v->domain; + int rc, order; + + if (HAS_PERVCPU_VHPT(d)) { + rc = pervcpu_vhpt_alloc(v); + if (rc != 0) + return rc; + } + + /* Create privregs page. */ + order = get_order_from_shift(XMAPPEDREGS_SHIFT); + v->arch.privregs = alloc_xenheap_pages(order); + BUG_ON(v->arch.privregs == NULL); + memset(v->arch.privregs, 0, 1 << XMAPPEDREGS_SHIFT); + vcpu_share_privregs_with_guest(v); return 0; } diff -r 770c465344d3 -r 3c8039aa5004 xen/include/asm-ia64/domain.h --- a/xen/include/asm-ia64/domain.h Thu Apr 05 09:13:16 2007 -0600 +++ b/xen/include/asm-ia64/domain.h Thu Apr 05 09:18:49 2007 -0600 @@ -21,6 +21,7 @@ extern void domain_relinquish_resources( extern void domain_relinquish_resources(struct domain *); struct vcpu; extern void relinquish_vcpu_resources(struct vcpu *v); +extern void vcpu_share_privregs_with_guest(struct vcpu *v); extern int vcpu_late_initialise(struct vcpu *v); /* given a current domain metaphysical address, return the physical address */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |