# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1171510212 -32400 # Node ID dcdb7f0db8e1e5b1cef10cf71a256f9dc35a8541 # Parent 91f6727f9f2fb16692bd7059651f675ea30724ef x86 XEN_DOMCTL_get_vcpucontext. don't convert cr3 of hvm domain into machine address. This is used only by the old xc_ptrace_core.c implementation. Hvm domain save/restore doesn't use. Machine address doens't make sense for new elf dump-core format of hvm domain. It needs pseudo physical address. PATCHNAME: xen_domctl_get_vcpucontext_for_hvm_domain Signed-off-by: Isaku Yamahata diff -r 91f6727f9f2f -r dcdb7f0db8e1 xen/arch/x86/domctl.c --- a/xen/arch/x86/domctl.c Mon Feb 19 16:21:44 2007 +0900 +++ b/xen/arch/x86/domctl.c Thu Feb 15 12:30:12 2007 +0900 @@ -464,6 +464,17 @@ void arch_get_info_guest(struct vcpu *v, /* IOPL privileges are virtualised: merge back into returned eflags. */ BUG_ON((c(user_regs.eflags) & EF_IOPL) != 0); c(user_regs.eflags |= v->arch.iopl << 12); + + if ( !IS_COMPAT(v->domain) ) + c.nat->ctrlreg[3] = + xen_pfn_to_cr3(pagetable_get_pfn(v->arch.guest_table)); +#ifdef CONFIG_COMPAT + else + { + l4_pgentry_t *l4e = __va(pagetable_get_paddr(v->arch.guest_table)); + c.cmp->ctrlreg[3] = compat_pfn_to_cr3(l4e_get_pfn(*l4e)); + } +#endif } c(flags &= ~(VGCF_i387_valid|VGCF_in_kernel)); @@ -471,16 +482,6 @@ void arch_get_info_guest(struct vcpu *v, c(flags |= VGCF_i387_valid); if ( guest_kernel_mode(v, &v->arch.guest_context.user_regs) ) c(flags |= VGCF_in_kernel); - - if ( !IS_COMPAT(v->domain) ) - c.nat->ctrlreg[3] = xen_pfn_to_cr3(pagetable_get_pfn(v->arch.guest_table)); -#ifdef CONFIG_COMPAT - else - { - l4_pgentry_t *l4e = __va(pagetable_get_paddr(v->arch.guest_table)); - c.cmp->ctrlreg[3] = compat_pfn_to_cr3(l4e_get_pfn(*l4e)); - } -#endif c(vm_assist = v->domain->vm_assist); #undef c