ia64/xen-unstable

changeset 12058:1c506820c468

[VMX] Replace vmx_load_cr2() with direct write to %cr2.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Oct 31 13:26:49 2006 +0000 (2006-10-31)
parents 1bf4f15c5141
children ceedd98b9afb
files xen/arch/x86/hvm/vmx/vmx.c xen/arch/x86/hvm/vmx/x86_32/exits.S xen/arch/x86/hvm/vmx/x86_64/exits.S xen/arch/x86/x86_32/asm-offsets.c xen/arch/x86/x86_64/asm-offsets.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Tue Oct 31 12:42:50 2006 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Tue Oct 31 13:26:49 2006 +0000
     1.3 @@ -2419,14 +2419,6 @@ asmlinkage void vmx_vmexit_handler(struc
     1.4      }
     1.5  }
     1.6  
     1.7 -asmlinkage void vmx_load_cr2(void)
     1.8 -{
     1.9 -    struct vcpu *v = current;
    1.10 -
    1.11 -    local_irq_disable();
    1.12 -    asm volatile("mov %0,%%cr2": :"r" (v->arch.hvm_vmx.cpu_cr2));
    1.13 -}
    1.14 -
    1.15  asmlinkage void vmx_trace_vmentry(void)
    1.16  {
    1.17      TRACE_5D(TRC_VMX_VMENTRY + current->vcpu_id,
     2.1 --- a/xen/arch/x86/hvm/vmx/x86_32/exits.S	Tue Oct 31 12:42:50 2006 +0000
     2.2 +++ b/xen/arch/x86/hvm/vmx/x86_32/exits.S	Tue Oct 31 13:26:49 2006 +0000
     2.3 @@ -105,7 +105,8 @@ ENTRY(vmx_asm_do_vmentry)
     2.4          jnz  vmx_process_softirqs
     2.5  
     2.6          call vmx_intr_assist
     2.7 -        call vmx_load_cr2
     2.8 +        movl VCPU_vmx_cr2(%ebx),%eax
     2.9 +        movl %eax,%cr2
    2.10          call vmx_trace_vmentry
    2.11  
    2.12          cmpl $0,VCPU_vmx_launched(%ebx)
     3.1 --- a/xen/arch/x86/hvm/vmx/x86_64/exits.S	Tue Oct 31 12:42:50 2006 +0000
     3.2 +++ b/xen/arch/x86/hvm/vmx/x86_64/exits.S	Tue Oct 31 13:26:49 2006 +0000
     3.3 @@ -115,7 +115,8 @@ ENTRY(vmx_asm_do_vmentry)
     3.4          jnz   vmx_process_softirqs
     3.5  
     3.6          call vmx_intr_assist
     3.7 -        call vmx_load_cr2
     3.8 +        movq VCPU_vmx_cr2(%rbx),%rax
     3.9 +        movq %rax,%cr2
    3.10          call vmx_trace_vmentry
    3.11  
    3.12          cmpl $0,VCPU_vmx_launched(%rbx)
     4.1 --- a/xen/arch/x86/x86_32/asm-offsets.c	Tue Oct 31 12:42:50 2006 +0000
     4.2 +++ b/xen/arch/x86/x86_32/asm-offsets.c	Tue Oct 31 13:26:49 2006 +0000
     4.3 @@ -86,6 +86,7 @@ void __dummy__(void)
     4.4      BLANK();
     4.5  
     4.6      OFFSET(VCPU_vmx_launched, struct vcpu, arch.hvm_vmx.launched);
     4.7 +    OFFSET(VCPU_vmx_cr2, struct vcpu, arch.hvm_vmx.cpu_cr2);
     4.8      BLANK();
     4.9  
    4.10      OFFSET(VMCB_rax, struct vmcb_struct, rax);
     5.1 --- a/xen/arch/x86/x86_64/asm-offsets.c	Tue Oct 31 12:42:50 2006 +0000
     5.2 +++ b/xen/arch/x86/x86_64/asm-offsets.c	Tue Oct 31 13:26:49 2006 +0000
     5.3 @@ -80,6 +80,7 @@ void __dummy__(void)
     5.4      BLANK();
     5.5  
     5.6      OFFSET(VCPU_vmx_launched, struct vcpu, arch.hvm_vmx.launched);
     5.7 +    OFFSET(VCPU_vmx_cr2, struct vcpu, arch.hvm_vmx.cpu_cr2);
     5.8      BLANK();
     5.9  
    5.10      OFFSET(VMCB_rax, struct vmcb_struct, rax);