ia64/xen-unstable

changeset 14634:ffb9dda42946

hvm svm: Inject #UD exception if guest tries to execute any SVM-related
function (except VMMCALL).
Signed-off-by: Mats Petersson <mats.petersson@amd.com>
author Keir Fraser <keir@xensource.com>
date Wed Mar 28 16:52:05 2007 +0100 (2007-03-28)
parents b6eaca0bcee1
children 5c52e5ca8459
files xen/arch/x86/hvm/svm/svm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/svm.c	Wed Mar 28 15:04:14 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Wed Mar 28 16:52:05 2007 +0100
     1.3 @@ -3156,14 +3156,22 @@ asmlinkage void svm_vmexit_handler(struc
     1.4          hvm_triple_fault();
     1.5          break;
     1.6  
     1.7 +    case VMEXIT_VMRUN:
     1.8 +    case VMEXIT_VMLOAD:
     1.9 +    case VMEXIT_VMSAVE:
    1.10 +    case VMEXIT_STGI:
    1.11 +    case VMEXIT_CLGI:
    1.12 +    case VMEXIT_SKINIT:
    1.13 +        /* Report "Invalid opcode" on any VM-operation except VMMCALL */
    1.14 +        svm_inject_exception(v, TRAP_invalid_op, 0, 0);
    1.15 +        break;
    1.16 +
    1.17      case VMEXIT_NPF:
    1.18 -    {
    1.19          regs->error_code = vmcb->exitinfo1;
    1.20          if ( !svm_do_nested_pgfault(vmcb->exitinfo2, regs) ) {
    1.21              domain_crash(v->domain);
    1.22          }
    1.23          break;
    1.24 -    }
    1.25  
    1.26      default:
    1.27      exit_and_crash: