WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [VMX] Replace vmx_load_cr2() with direct

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [VMX] Replace vmx_load_cr2() with direct write to %cr2.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 31 Oct 2006 17:40:19 +0000
Delivery-date: Thu, 02 Nov 2006 13:39:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 1c506820c46864e337fcbe79f091ce38b4ec8c31
# Parent  1bf4f15c5141edb20bddacc09ec64db550236e05
[VMX] Replace vmx_load_cr2() with direct write to %cr2.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmx.c          |    8 --------
 xen/arch/x86/hvm/vmx/x86_32/exits.S |    3 ++-
 xen/arch/x86/hvm/vmx/x86_64/exits.S |    3 ++-
 xen/arch/x86/x86_32/asm-offsets.c   |    1 +
 xen/arch/x86/x86_64/asm-offsets.c   |    1 +
 5 files changed, 6 insertions(+), 10 deletions(-)

diff -r 1bf4f15c5141 -r 1c506820c468 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Tue Oct 31 12:42:50 2006 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Tue Oct 31 13:26:49 2006 +0000
@@ -2419,14 +2419,6 @@ asmlinkage void vmx_vmexit_handler(struc
     }
 }
 
-asmlinkage void vmx_load_cr2(void)
-{
-    struct vcpu *v = current;
-
-    local_irq_disable();
-    asm volatile("mov %0,%%cr2": :"r" (v->arch.hvm_vmx.cpu_cr2));
-}
-
 asmlinkage void vmx_trace_vmentry(void)
 {
     TRACE_5D(TRC_VMX_VMENTRY + current->vcpu_id,
diff -r 1bf4f15c5141 -r 1c506820c468 xen/arch/x86/hvm/vmx/x86_32/exits.S
--- a/xen/arch/x86/hvm/vmx/x86_32/exits.S       Tue Oct 31 12:42:50 2006 +0000
+++ b/xen/arch/x86/hvm/vmx/x86_32/exits.S       Tue Oct 31 13:26:49 2006 +0000
@@ -105,7 +105,8 @@ ENTRY(vmx_asm_do_vmentry)
         jnz  vmx_process_softirqs
 
         call vmx_intr_assist
-        call vmx_load_cr2
+        movl VCPU_vmx_cr2(%ebx),%eax
+        movl %eax,%cr2
         call vmx_trace_vmentry
 
         cmpl $0,VCPU_vmx_launched(%ebx)
diff -r 1bf4f15c5141 -r 1c506820c468 xen/arch/x86/hvm/vmx/x86_64/exits.S
--- a/xen/arch/x86/hvm/vmx/x86_64/exits.S       Tue Oct 31 12:42:50 2006 +0000
+++ b/xen/arch/x86/hvm/vmx/x86_64/exits.S       Tue Oct 31 13:26:49 2006 +0000
@@ -115,7 +115,8 @@ ENTRY(vmx_asm_do_vmentry)
         jnz   vmx_process_softirqs
 
         call vmx_intr_assist
-        call vmx_load_cr2
+        movq VCPU_vmx_cr2(%rbx),%rax
+        movq %rax,%cr2
         call vmx_trace_vmentry
 
         cmpl $0,VCPU_vmx_launched(%rbx)
diff -r 1bf4f15c5141 -r 1c506820c468 xen/arch/x86/x86_32/asm-offsets.c
--- a/xen/arch/x86/x86_32/asm-offsets.c Tue Oct 31 12:42:50 2006 +0000
+++ b/xen/arch/x86/x86_32/asm-offsets.c Tue Oct 31 13:26:49 2006 +0000
@@ -86,6 +86,7 @@ void __dummy__(void)
     BLANK();
 
     OFFSET(VCPU_vmx_launched, struct vcpu, arch.hvm_vmx.launched);
+    OFFSET(VCPU_vmx_cr2, struct vcpu, arch.hvm_vmx.cpu_cr2);
     BLANK();
 
     OFFSET(VMCB_rax, struct vmcb_struct, rax);
diff -r 1bf4f15c5141 -r 1c506820c468 xen/arch/x86/x86_64/asm-offsets.c
--- a/xen/arch/x86/x86_64/asm-offsets.c Tue Oct 31 12:42:50 2006 +0000
+++ b/xen/arch/x86/x86_64/asm-offsets.c Tue Oct 31 13:26:49 2006 +0000
@@ -80,6 +80,7 @@ void __dummy__(void)
     BLANK();
 
     OFFSET(VCPU_vmx_launched, struct vcpu, arch.hvm_vmx.launched);
+    OFFSET(VCPU_vmx_cr2, struct vcpu, arch.hvm_vmx.cpu_cr2);
     BLANK();
 
     OFFSET(VMCB_rax, struct vmcb_struct, rax);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [VMX] Replace vmx_load_cr2() with direct write to %cr2., Xen patchbot-unstable <=