[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.10] x86/hvm: Don't ignore unknown MSRs in the migration stream
>>> On 16.11.17 at 20:15, <andrew.cooper3@xxxxxxxxxx> 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@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |