|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-3.2-testing] x86 vmx: Streamline vmx_interrupt_bloc
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1203344057 0
# Node ID 9f835c84d2be1bf7aca8b6db0bc9cc32e65b7817
# Parent 630a044658f47804b2bd83a03f1dc7ee28df0ecf
x86 vmx: Streamline vmx_interrupt_blocked() to avoid a VMREAD if
interrupt delivery is blocked by EFLAGS.IF. This speeds up real-mode
emulation in some cases (where we are currently executing
hvm_local_events_need_delivery() after every instruction).
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset: 17039:4c64376d439d3237e81f56b0fdfac7fe6601ec82
xen-unstable date: Wed Feb 13 16:28:38 2008 +0000
---
xen/arch/x86/hvm/vmx/vmx.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff -r 630a044658f4 -r 9f835c84d2be xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c Mon Feb 18 14:13:45 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c Mon Feb 18 14:14:17 2008 +0000
@@ -995,6 +995,14 @@ static enum hvm_intblk vmx_interrupt_blo
{
unsigned long intr_shadow;
+ /*
+ * Test EFLAGS.IF first. It is often the most likely reason for interrupt
+ * blockage, and is the cheapest to test (because no VMREAD is required).
+ */
+ if ( (intack.source != hvm_intsrc_nmi) &&
+ !(guest_cpu_user_regs()->eflags & X86_EFLAGS_IF) )
+ return hvm_intblk_rflags_ie;
+
intr_shadow = __vmread(GUEST_INTERRUPTIBILITY_INFO);
if ( intr_shadow & (VMX_INTR_SHADOW_STI|VMX_INTR_SHADOW_MOV_SS) )
@@ -1006,9 +1014,6 @@ static enum hvm_intblk vmx_interrupt_blo
ASSERT((intack.source == hvm_intsrc_pic) ||
(intack.source == hvm_intsrc_lapic));
-
- if ( !(guest_cpu_user_regs()->eflags & X86_EFLAGS_IF) )
- return hvm_intblk_rflags_ie;
return hvm_intblk_none;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-3.2-testing] x86 vmx: Streamline vmx_interrupt_blocked() to avoid a VMREAD if,
Xen patchbot-3.2-testing <=
|
|
|
|
|