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] x86 vmx: Streamline vmx_interrupt_blocked

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 vmx: Streamline vmx_interrupt_blocked() to avoid a VMREAD if
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Feb 2008 15:10:09 -0800
Delivery-date: Wed, 13 Feb 2008 15:10:14 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1202920118 0
# Node ID 4c64376d439d3237e81f56b0fdfac7fe6601ec82
# Parent  e56c9fe4a7e6d044d31a052072e6bfb06ee58535
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/arch/x86/hvm/vmx/vmx.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff -r e56c9fe4a7e6 -r 4c64376d439d xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Wed Feb 13 16:25:32 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Wed Feb 13 16:28:38 2008 +0000
@@ -917,6 +917,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) )
@@ -928,9 +936,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-unstable] x86 vmx: Streamline vmx_interrupt_blocked() to avoid a VMREAD if, Xen patchbot-unstable <=