>>> On 16.11.17 at 20:15, <andrew.coop...@citrix.com> wrote: > Doing so amounts to silent state corruption, and must be avoided.
I think a little more explanation is needed on why the current code is insufficient. Note specifically this for ( i = 0; !err && i < ctxt->count; ++i ) { switch ( ctxt->msr[i].index ) { default: if ( !ctxt->msr[i]._rsvd ) err = -ENXIO; break; } } in hvm_load_cpu_msrs(), intended to give vendor code a first shot, but allowing for vendor independent MSRs to be handled here. > --- a/xen/arch/x86/hvm/svm/svm.c > +++ b/xen/arch/x86/hvm/svm/svm.c > @@ -450,7 +450,7 @@ static int svm_load_msr(struct vcpu *v, struct hvm_msr > *ctxt) > break; > > default: > - continue; > + err = -ENXIO; > } If the change was nevertheless needed, please add break statements here (and in VMX code as well), despite this currently being the last label in the switch() block. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel