[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] x86: MSR_IA32_BNDCFGS save/restore



>>> On 13.12.13 at 18:57, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 13/12/2013 14:02, Jan Beulich wrote:
>> +static int vmx_load_msr(struct vcpu *v, struct hvm_msr *ctxt)
>> +{
>> +    unsigned int i;
>> +    int err = 0;
>> +
>> +    vmx_vmcs_enter(v);
>> +
>> +    for ( i = 0; i < ctxt->count; ++i )
>> +    {
>> +        switch ( ctxt->msr[i].index )
>> +        {
>> +        case MSR_IA32_BNDCFGS:
>> +            if ( cpu_has_mpx )
>> +                __vmwrite(GUEST_BNDCFGS, ctxt->msr[i].val);
>> +            else
>> +                err = -ENXIO;
>> +            break;
>> +        default:
>> +            continue;
> 
> This will skip setting _rsvd for an MSR we don't recognise.  Doesn't
> this interfere with the error checking in the caller?

No - that's exactly the purpose: Not setting _rsvd will allow the caller
to know this MSR was unrecognized by the vendor specific code, and
hence if the generic code also can#t deal with it, the restore _must_
fail.

Jan


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.