diff options
-rw-r--r-- | docs/misc/dump-core-format.txt | 8 | ||||
-rw-r--r-- | tools/libxc/xc_core.c | 2 | ||||
-rw-r--r-- | tools/libxc/xc_core_ia64.c | 11 | ||||
-rw-r--r-- | xen/arch/ia64/vmx/vmx_init.c | 1 | ||||
-rw-r--r-- | xen/arch/ia64/xen/domain.c | 9 | ||||
-rw-r--r-- | xen/include/asm-ia64/domain.h | 1 | ||||
-rw-r--r-- | xen/include/public/arch-ia64.h | 5 |
7 files changed, 29 insertions, 8 deletions
diff --git a/docs/misc/dump-core-format.txt b/docs/misc/dump-core-format.txt index aa32d810d8..bc1842c747 100644 --- a/docs/misc/dump-core-format.txt +++ b/docs/misc/dump-core-format.txt @@ -127,8 +127,10 @@ Currently the following sections are defined. Some sections are optional. This section stores the array of mapped_regs_t. The size of array is stored in xch_nr_vcpus member of header note descriptor in .note.Xen note section. - This section is ia64 specific and must exist for ia64 domain. - This section must not exist for non-ia64 domain. + This section is ia64 specific and must exist for ia64 PV + domain. + This section must not exist for non-ia64 domain or ia64 HVM + domain. note section @@ -237,3 +239,5 @@ Currently only (major, minor) = (0, 1) is used. - EI_CLASS member of elf header was changed to ELFCLASS64 independent of architecture. This is mainly for x86_32pae. The format version isn't bumped because analysis tools can distinguish it. +- .xen_ia64_mapped_regs section was made only for ia64 PV domain. + In case of IA64 HVM domain, this section doesn't exist. diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c index a939e95c75..edcf67cfc0 100644 --- a/tools/libxc/xc_core.c +++ b/tools/libxc/xc_core.c @@ -32,7 +32,7 @@ * |.xen_prstatus | * | vcpu_guest_context_t[nr_vcpus] | * +--------------------------------------------------------+ - * |.xen_ia64_mmapped_regs if ia64 | + * |.xen_ia64_mmapped_regs if ia64 pv | * | mmapped_regs_t[nr_vcpus] | * +--------------------------------------------------------+ * |.xen_shared_info if possible | diff --git a/tools/libxc/xc_core_ia64.c b/tools/libxc/xc_core_ia64.c index 443578a0a8..bd233cd1a6 100644 --- a/tools/libxc/xc_core_ia64.c +++ b/tools/libxc/xc_core_ia64.c @@ -312,6 +312,10 @@ xc_core_arch_context_get(struct xc_core_arch_context* arch_ctxt, int xc_handle, uint32_t domid) { mapped_regs_t* mapped_regs; + + if ( ctxt->privregs_pfn == VGC_PRIVREGS_HVM ) + return 0; /* VTi domain case */ + if ( ctxt->privregs_pfn == INVALID_P2M_ENTRY ) { PERROR("Could not get mmapped privregs gmfn"); @@ -340,6 +344,13 @@ xc_core_arch_context_get_shdr(struct xc_core_arch_context *arch_ctxt, int sts = -1; Elf64_Shdr *shdr; + if ( arch_ctxt->nr_vcpus == 0 ) + { + /* VTi domain case */ + *filesz = 0; + return 0; + } + /* mmapped priv regs */ shdr = xc_core_shdr_get(sheaders); if ( shdr == NULL ) diff --git a/xen/arch/ia64/vmx/vmx_init.c b/xen/arch/ia64/vmx/vmx_init.c index f29f9cfe30..a1f03b64d1 100644 --- a/xen/arch/ia64/vmx/vmx_init.c +++ b/xen/arch/ia64/vmx/vmx_init.c @@ -309,7 +309,6 @@ vmx_final_setup_guest(struct vcpu *v) return -ENOMEM; v->arch.privregs = (mapped_regs_t *)vpd; - vcpu_share_privregs_with_guest(v); vpd->vpd_low.virt_env_vaddr = vm_buffer; v->domain->arch.vmx_platform.gos_type = OS_UNKNOWN; diff --git a/xen/arch/ia64/xen/domain.c b/xen/arch/ia64/xen/domain.c index 8a8d2cd74b..f8e3bff5eb 100644 --- a/xen/arch/ia64/xen/domain.c +++ b/xen/arch/ia64/xen/domain.c @@ -470,7 +470,7 @@ int vcpu_initialise(struct vcpu *v) return 0; } -void vcpu_share_privregs_with_guest(struct vcpu *v) +static void vcpu_share_privregs_with_guest(struct vcpu *v) { struct domain *d = v->domain; int i, order = get_order_from_shift(XMAPPEDREGS_SHIFT); @@ -939,8 +939,11 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c) c.nat->regs.rbs_rnat &= ~((1UL << bottom_slot) - 1); } - c.nat->privregs_pfn = get_gpfn_from_mfn - (virt_to_maddr(v->arch.privregs) >> PAGE_SHIFT); + if (VMX_DOMAIN(v)) + c.nat->privregs_pfn = VGC_PRIVREGS_HVM; + else + c.nat->privregs_pfn = get_gpfn_from_mfn( + virt_to_maddr(v->arch.privregs) >> PAGE_SHIFT); for (i = 0; i < IA64_NUM_DBG_REGS; i++) { if (VMX_DOMAIN(v)) { diff --git a/xen/include/asm-ia64/domain.h b/xen/include/asm-ia64/domain.h index 7d2b5be64a..68e5256f04 100644 --- a/xen/include/asm-ia64/domain.h +++ b/xen/include/asm-ia64/domain.h @@ -20,7 +20,6 @@ struct tlb_track; 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 */ diff --git a/xen/include/public/arch-ia64.h b/xen/include/public/arch-ia64.h index d65a48631a..511998bca0 100644 --- a/xen/include/public/arch-ia64.h +++ b/xen/include/public/arch-ia64.h @@ -427,6 +427,11 @@ struct vcpu_guest_context { struct vcpu_guest_context_regs regs; unsigned long event_callback_ip; + + /* xen doesn't share privregs pages with hvm domain so that this member + * doesn't make sense for hvm domain. + * ~0UL is already used for INVALID_P2M_ENTRY. */ +#define VGC_PRIVREGS_HVM (~(-2UL)) unsigned long privregs_pfn; }; typedef struct vcpu_guest_context vcpu_guest_context_t; |