On 17/11/17 12:10, Jan Beulich wrote:
>>>> 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.

That is sufficiently subtle and non-obvious that I'm still having a hard
time convincing myself that its correct.  Also, this use of _rsvd really
should be document.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to