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

[Xen-changelog] [xen-3.1-testing] svm: Intercept and disallow MONITOR/MWAIT.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1196958480 0
# Node ID 6bf00a194bf6833a6f126bc518ae337c56be3ee5
# Parent  18619dfe5257e46108bc96cf4445e3de44a6fac0
svm: Intercept and disallow MONITOR/MWAIT.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset:   16366:837f83225153547109480d63b3386cb8f65b5274
xen-unstable date:        Fri Nov 09 12:08:37 2007 +0000
---
 xen/arch/x86/hvm/svm/svm.c  |    3 ++-
 xen/arch/x86/hvm/svm/vmcb.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff -r 18619dfe5257 -r 6bf00a194bf6 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Thu Dec 06 16:26:58 2007 +0000
+++ b/xen/arch/x86/hvm/svm/svm.c        Thu Dec 06 16:28:00 2007 +0000
@@ -2587,13 +2587,14 @@ asmlinkage void svm_vmexit_handler(struc
         hvm_triple_fault();
         break;
 
+    case VMEXIT_MONITOR:
+    case VMEXIT_MWAIT:
     case VMEXIT_VMRUN:
     case VMEXIT_VMLOAD:
     case VMEXIT_VMSAVE:
     case VMEXIT_STGI:
     case VMEXIT_CLGI:
     case VMEXIT_SKINIT:
-        /* Report "Invalid opcode" on any VM-operation except VMMCALL */
         svm_inject_exception(v, TRAP_invalid_op, 0, 0);
         break;
 
diff -r 18619dfe5257 -r 6bf00a194bf6 xen/arch/x86/hvm/svm/vmcb.c
--- a/xen/arch/x86/hvm/svm/vmcb.c       Thu Dec 06 16:26:58 2007 +0000
+++ b/xen/arch/x86/hvm/svm/vmcb.c       Thu Dec 06 16:28:00 2007 +0000
@@ -125,7 +125,8 @@ static int construct_vmcb(struct vcpu *v
         GENERAL2_INTERCEPT_VMLOAD | GENERAL2_INTERCEPT_VMSAVE  |
         GENERAL2_INTERCEPT_STGI   | GENERAL2_INTERCEPT_CLGI    |
         GENERAL2_INTERCEPT_SKINIT | GENERAL2_INTERCEPT_RDTSCP  |
-        GENERAL2_INTERCEPT_WBINVD;
+        GENERAL2_INTERCEPT_WBINVD | GENERAL2_INTERCEPT_MONITOR |
+        GENERAL2_INTERCEPT_MWAIT;
 
     /* Intercept all debug-register writes. */
     vmcb->dr_intercepts = ~0u;

_______________________________________________
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®.