ia64/xen-unstable

changeset 16366:837f83225153

svm: Intercept and disallow MONITOR/MWAIT.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Fri Nov 09 12:08:37 2007 +0000 (2007-11-09)
parents fc8be8f3707b
children 8d8d179b9b05
files xen/arch/x86/hvm/svm/svm.c xen/arch/x86/hvm/svm/vmcb.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/svm.c	Fri Nov 09 12:05:27 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Fri Nov 09 12:08:37 2007 +0000
     1.3 @@ -2280,13 +2280,14 @@ asmlinkage void svm_vmexit_handler(struc
     1.4          hvm_triple_fault();
     1.5          break;
     1.6  
     1.7 +    case VMEXIT_MONITOR:
     1.8 +    case VMEXIT_MWAIT:
     1.9      case VMEXIT_VMRUN:
    1.10      case VMEXIT_VMLOAD:
    1.11      case VMEXIT_VMSAVE:
    1.12      case VMEXIT_STGI:
    1.13      case VMEXIT_CLGI:
    1.14      case VMEXIT_SKINIT:
    1.15 -        /* Report "Invalid opcode" on any VM-operation except VMMCALL */
    1.16          svm_inject_exception(v, TRAP_invalid_op, 0, 0);
    1.17          break;
    1.18  
     2.1 --- a/xen/arch/x86/hvm/svm/vmcb.c	Fri Nov 09 12:05:27 2007 +0000
     2.2 +++ b/xen/arch/x86/hvm/svm/vmcb.c	Fri Nov 09 12:08:37 2007 +0000
     2.3 @@ -128,7 +128,8 @@ static int construct_vmcb(struct vcpu *v
     2.4          GENERAL2_INTERCEPT_VMLOAD      | GENERAL2_INTERCEPT_VMSAVE      |
     2.5          GENERAL2_INTERCEPT_STGI        | GENERAL2_INTERCEPT_CLGI        |
     2.6          GENERAL2_INTERCEPT_SKINIT      | GENERAL2_INTERCEPT_RDTSCP      |
     2.7 -        GENERAL2_INTERCEPT_WBINVD;
     2.8 +        GENERAL2_INTERCEPT_WBINVD      | GENERAL2_INTERCEPT_MONITOR     |
     2.9 +        GENERAL2_INTERCEPT_MWAIT;
    2.10  
    2.11      /* Intercept all debug-register writes. */
    2.12      vmcb->dr_intercepts = ~0u;