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

Re: [Xen-devel] [PATCH 1/6] x86: stop handling MSR_IA32_BNDCFGS save/restore in implementation code



>>> On 11.03.19 at 17:10, <Paul.Durrant@xxxxxxxxxx> wrote:
>> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
>> Sent: 08 March 2019 16:40
>> 
>> >>> On 07.01.19 at 13:02, <paul.durrant@xxxxxxxxxx> wrote:
>> > @@ -3472,12 +3494,6 @@ int hvm_msr_read_intercept(unsigned int msr, 
>> > uint64_t *msr_content)
>> >          *msr_content = v->arch.hvm.msr_xss;
>> >          break;
>> >
>> > -    case MSR_IA32_BNDCFGS:
>> > -        if ( !d->arch.cpuid->feat.mpx ||
>> > -             !hvm_get_guest_bndcfgs(v, msr_content) )
>> > -            goto gp_fault;
>> > -        break;
>> 
>> Note how this already checks the CPUID policy, somewhat contrary to
>> what you say in the commit message. I think this wants to remain this
>> way in guest_{rd,wr}msr() - see all the other CPUID policy checks there.
>> That way hvm_get_guest_bndcfgs() can be made consistent with the
>> hook pointer type again, and it can remain an inline function as before.
> 
> I thought it was neater to put the check inside the helper but I can pull it 
> out into the switch statement if that's preferred.

Unless Andrew explicitly tells you otherwise, please do for the sake of
consistency with other code in that switch().

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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