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-devel

[Xen-devel] clear redunadant IRQ disable

To: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Yu, Ke" <ke.yu@xxxxxxxxx>, "Christian Limpach" <christian.limpach@xxxxxxxxx>
Subject: [Xen-devel] clear redunadant IRQ disable
From: "Dong, Eddie" <eddie.dong@xxxxxxxxx>
Date: Tue, 31 Oct 2006 16:38:10 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Huang, Xinmei" <xinmei.huang@xxxxxxxxx>
Delivery-date: Thu, 02 Nov 2006 13:54:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acbwn3GTeQX7YqjuSrWHsAKaEOOOQwANzaogAF+2ZZACaGUm0AAEkMSwAAbrrDAAAklb1wAAHUJQACYey+A=
Thread-topic: clear redunadant IRQ disable
Clear the redundant code in vmx_load_cr2 and use got "%EBX" for current
vcpu pointer.


Signed-off-by: Eddie Dong <eddie.dong@xxxxxxxxx>


diff -r b21246720fde xen/arch/x86/hvm/vmx/io.c
--- a/xen/arch/x86/hvm/vmx/io.c Mon Oct 30 17:35:11 2006 +0000
+++ b/xen/arch/x86/hvm/vmx/io.c Tue Oct 31 13:27:15 2006 +0800
@@ -90,12 +90,11 @@ static void update_tpr_threshold(struct 
 #define update_tpr_threshold(v) ((void)0)
 #endif
 
-asmlinkage void vmx_intr_assist(void)
+asmlinkage void vmx_intr_assist(struct vcpu *v)
 {
     int intr_type = 0;
     int highest_vector;
     unsigned long eflags;
-    struct vcpu *v = current;
     struct vlapic *vlapic = VLAPIC(v);
     struct hvm_domain *plat=&v->domain->arch.hvm_domain;
     struct periodic_time *pt = &plat->pl_time.periodic_tm;
diff -r b21246720fde xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Mon Oct 30 17:35:11 2006 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Tue Oct 31 14:01:30 2006 +0800
@@ -2419,11 +2419,8 @@ asmlinkage void vmx_vmexit_handler(struc
     }
 }
 
-asmlinkage void vmx_load_cr2(void)
-{
-    struct vcpu *v = current;
-
-    local_irq_disable();
+asmlinkage void vmx_load_cr2(struct vcpu *v)
+{
     asm volatile("mov %0,%%cr2": :"r" (v->arch.hvm_vmx.cpu_cr2));
 }
 
diff -r b21246720fde xen/arch/x86/hvm/vmx/x86_32/exits.S
--- a/xen/arch/x86/hvm/vmx/x86_32/exits.S       Mon Oct 30 17:35:11 2006
+0000
+++ b/xen/arch/x86/hvm/vmx/x86_32/exits.S       Tue Oct 31 15:55:32 2006
+0800
@@ -104,8 +104,11 @@ ENTRY(vmx_asm_do_vmentry)
         cmpl $0,irq_stat(%eax,1)
         jnz  vmx_process_softirqs
 
+        push %ebx
         call vmx_intr_assist
+        push %ebx
         call vmx_load_cr2
+        addl $8,%esp
         call vmx_trace_vmentry
 
         cmpl $0,VCPU_vmx_launched(%ebx)
diff -r b21246720fde xen/arch/x86/hvm/vmx/x86_64/exits.S
--- a/xen/arch/x86/hvm/vmx/x86_64/exits.S       Mon Oct 30 17:35:11 2006
+0000
+++ b/xen/arch/x86/hvm/vmx/x86_64/exits.S       Tue Oct 31 15:04:45 2006
+0800
@@ -114,7 +114,9 @@ ENTRY(vmx_asm_do_vmentry)
         cmpl  $0,(%rdx,%rax,1)
         jnz   vmx_process_softirqs
 
+        movq %rbx,%rdi
         call vmx_intr_assist
+        movq %rbx,%rdi
         call vmx_load_cr2
         call vmx_trace_vmentry
 
diff -r b21246720fde xen/include/asm-x86/hvm/vmx/vmx.h
--- a/xen/include/asm-x86/hvm/vmx/vmx.h Mon Oct 30 17:35:11 2006 +0000
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h Tue Oct 31 14:01:27 2006 +0800
@@ -28,7 +28,8 @@
 
 extern void vmx_asm_vmexit_handler(struct cpu_user_regs);
 extern void vmx_asm_do_vmentry(void);
-extern void vmx_intr_assist(void);
+extern void vmx_intr_assist(struct vcpu *v);
+extern void vmx_load_cr2(struct vcpu *v);
 extern void vmx_migrate_timers(struct vcpu *v);
 extern void arch_vmx_do_launch(struct vcpu *);
 extern void arch_vmx_do_resume(struct vcpu *);

Attachment: redunant.patch
Description: redunant.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>