From: Andrew Cooper Date: Fri, 7 Apr 2017 15:38:53 +0000 (+0100) Subject: x86/svm: Correct event injection check in svm_vmcb_restore() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ef7f5bbf9d77062de6bdd4a5801af97b903644ac;p=people%2Froyger%2Fxen.git x86/svm: Correct event injection check in svm_vmcb_restore() SVM's maximum valid event type is 4. This appears to be a straigth copy and paste error in c/s e94e3f210a62, as VT-x's maximum is 6. Signed-off-by: Andrew Cooper Reviewed-by: Boris Ostrovsky --- diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 1f8aca6cd9..531c64fe23 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -271,7 +271,7 @@ static int svm_vmcb_restore(struct vcpu *v, struct hvm_hw_cpu *c) if ( c->pending_valid ) { - if ( (c->pending_type == 1) || (c->pending_type > 6) || + if ( (c->pending_type == 1) || (c->pending_type > 4) || (c->pending_reserved != 0) ) { dprintk(XENLOG_ERR, "%pv: Invalid pending event %#"PRIx32"\n",