From: Keir Fraser Date: Mon, 18 Apr 2011 09:10:02 +0000 (+0100) Subject: svm: decode-assists feature must depend on nextrip feature. X-Git-Tag: 4.2.0-rc1~2346 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=88f1c41bd86e47a2b18e5cfda4df305287ae30e9;p=xen.git svm: decode-assists feature must depend on nextrip feature. ...since the decode-assist fast paths assume nextrip vmcb field is valid. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index e76509b234..8753cafa3e 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -995,6 +995,10 @@ struct hvm_function_table * __init start_svm(void) printk("SVM: Supported advanced features:\n"); + /* DecodeAssists fast paths assume nextrip is valid for fast rIP update. */ + if ( !cpu_has_svm_nrips ) + clear_bit(SVM_FEATURE_DECODEASSISTS, &svm_feature_flags); + #define P(p,s) if ( p ) { printk(" - %s\n", s); printed = 1; } P(cpu_has_svm_npt, "Nested Page Tables (NPT)"); P(cpu_has_svm_lbrv, "Last Branch Record (LBR) Virtualisation"); @@ -1142,7 +1146,6 @@ static void svm_vmexit_do_cr_access( rc = dir ? hvm_mov_to_cr(cr, gp) : hvm_mov_from_cr(cr, gp); - ASSERT(cpu_has_svm_nrips); if ( rc == X86EMUL_OKAY ) __update_guest_eip(regs, vmcb->nextrip - vmcb->rip); }