[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Remove double invocation of vmx_intr_assist when VM_EXIT



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 5f3f9701ac11f8e302f8d0dfaeab53206551a675
# Parent  43d91cbb1bfb7cde37f46a00f383c11b24b8d5aa
Remove double invocation of vmx_intr_assist when VM_EXIT
causes a domain switch.

Signed-off-by: Eddie Dong <eddie.dong@xxxxxxxxx>
Signed-off-by: Edwin Zhai <edwin.zhai@xxxxxxxxx>

diff -r 43d91cbb1bfb -r 5f3f9701ac11 xen/arch/x86/vmx.c
--- a/xen/arch/x86/vmx.c        Mon Aug 22 23:07:37 2005
+++ b/xen/arch/x86/vmx.c        Tue Aug 23 09:26:11 2005
@@ -1712,9 +1712,6 @@
     default:
         __vmx_bug(&regs);       /* should not happen */
     }
-
-    vmx_intr_assist(v);
-    return;
 }
 
 asmlinkage void load_cr2(void)
diff -r 43d91cbb1bfb -r 5f3f9701ac11 xen/arch/x86/vmx_io.c
--- a/xen/arch/x86/vmx_io.c     Mon Aug 22 23:07:37 2005
+++ b/xen/arch/x86/vmx_io.c     Tue Aug 23 09:26:11 2005
@@ -631,12 +631,14 @@
     return ((eflags & X86_EFLAGS_IF) == 0);
 }
 
-void vmx_intr_assist(struct vcpu *v) 
+asmlinkage void vmx_intr_assist(void) 
 {
     int intr_type = 0;
-    int highest_vector = find_highest_pending_irq(v, &intr_type);
+    int highest_vector;
     unsigned long intr_fields, eflags, interruptibility, cpu_exec_control;
-
+    struct vcpu *v = current;
+
+    highest_vector = find_highest_pending_irq(v, &intr_type);
     __vmread(CPU_BASED_VM_EXEC_CONTROL, &cpu_exec_control);
 
     if (highest_vector == -1) {
@@ -712,9 +714,6 @@
 
     /* We can't resume the guest if we're waiting on I/O */
     ASSERT(!test_bit(ARCH_VMX_IO_WAIT, &d->arch.arch_vmx.flags));
-
-    /* We always check for interrupts before resuming guest */
-    vmx_intr_assist(d);
 }
 
 #endif /* CONFIG_VMX */
diff -r 43d91cbb1bfb -r 5f3f9701ac11 xen/arch/x86/x86_32/entry.S
--- a/xen/arch/x86/x86_32/entry.S       Mon Aug 22 23:07:37 2005
+++ b/xen/arch/x86/x86_32/entry.S       Tue Aug 23 09:26:11 2005
@@ -140,6 +140,7 @@
         jnz 2f
 
 /* vmx_restore_all_guest */
+        call vmx_intr_assist
         call load_cr2
         .endif
         VMX_RESTORE_ALL_NOSEGREGS
diff -r 43d91cbb1bfb -r 5f3f9701ac11 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S       Mon Aug 22 23:07:37 2005
+++ b/xen/arch/x86/x86_64/entry.S       Tue Aug 23 09:26:11 2005
@@ -233,6 +233,7 @@
         jnz  2f 
 
 /* vmx_restore_all_guest */
+        call vmx_intr_assist
         call load_cr2
         .endif
         /* 
diff -r 43d91cbb1bfb -r 5f3f9701ac11 xen/include/asm-x86/vmx.h
--- a/xen/include/asm-x86/vmx.h Mon Aug 22 23:07:37 2005
+++ b/xen/include/asm-x86/vmx.h Tue Aug 23 09:26:11 2005
@@ -31,7 +31,7 @@
 extern void vmx_asm_vmexit_handler(struct cpu_user_regs);
 extern void vmx_asm_do_resume(void);
 extern void vmx_asm_do_launch(void);
-extern void vmx_intr_assist(struct vcpu *d);
+extern void vmx_intr_assist(void);
 
 extern void arch_vmx_do_launch(struct vcpu *);
 extern void arch_vmx_do_resume(struct vcpu *);
@@ -355,7 +355,7 @@
 }
 
 /* Make sure that xen intercepts any FP accesses from current */
-static inline void vmx_stts()
+static inline void vmx_stts(void)
 {
     unsigned long cr0;
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.