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] svm: Check exitcode for NRIP validity onl

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] svm: Check exitcode for NRIP validity only in debug builds.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Oct 2008 07:50:20 -0700
Delivery-date: Wed, 22 Oct 2008 07:51:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 1224241970 -3600
# Node ID 3411819435b9d8f5ea51863edd0da81a4891cf66
# Parent  609d0d34450f373b930188477e9087a62481f9a4
svm: Check exitcode for NRIP validity only in debug builds.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/emulate.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff -r 609d0d34450f -r 3411819435b9 xen/arch/x86/hvm/svm/emulate.c
--- a/xen/arch/x86/hvm/svm/emulate.c    Fri Oct 17 12:04:11 2008 +0100
+++ b/xen/arch/x86/hvm/svm/emulate.c    Fri Oct 17 12:12:50 2008 +0100
@@ -68,24 +68,25 @@ static unsigned long svm_nextrip_insn_le
     if ( !cpu_has_svm_nrips || (vmcb->nextrip <= vmcb->rip) )
         return 0;
 
+#ifndef NDEBUG
     switch ( vmcb->exitcode )
     {
     case VMEXIT_CR0_READ... VMEXIT_DR15_WRITE:
         /* faults due to instruction intercepts */
         /* (exitcodes 84-95) are reserved */
     case VMEXIT_IDTR_READ ... VMEXIT_TR_WRITE:
-    case VMEXIT_RDTSC ... VMEXIT_SWINT:
-    case VMEXIT_INVD ... VMEXIT_INVLPGA:
+    case VMEXIT_RDTSC ... VMEXIT_MSR:
     case VMEXIT_VMRUN ...  VMEXIT_MWAIT_CONDITIONAL:
-    case VMEXIT_IOIO:
         /* ...and the rest of the #VMEXITs */
     case VMEXIT_CR0_SEL_WRITE:
-    case VMEXIT_MSR:
     case VMEXIT_EXCEPTION_BP:
-        return vmcb->nextrip - vmcb->rip;
-    }
-  
-    return 0;
+        break;
+    default:
+        BUG();
+    }
+#endif
+
+    return vmcb->nextrip - vmcb->rip;
 }
 
 /* First byte: Length. Following bytes: Opcode bytes. */

_______________________________________________
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] svm: Check exitcode for NRIP validity only in debug builds., Xen patchbot-unstable <=