On 24/05/18 16:12, Jan Beulich wrote:
>>>> On 22.05.18 at 13:20, <andrew.coop...@citrix.com> wrote:
>> The main purpose of this change is to allow us to set a specific MSR value,
>> without needing to know whether there is already a load/save list slot for 
>> it.
>> Previously, callers wanting this property needed to call both vmx_add_*_msr()
>> and vmx_write_*_msr() to cover both cases.
>>
>> As a result of this API improvement, the default value for guest MSRs need 
>> not
>> be 0, and the default for host MSRs need not be passed via hardware register.
>> In practice, this cleans up the VPMU allocation logic, and avoids an MSR read
>> as part of vcpu construction.
> But this also means: If there already is such an entry, the previous value 
> will
> now be blindly overwritten. Are you sure this is always what is wanted?

You are correct.  This will end up resetting the LBR MSRs whenever the
guest writes to MSR_DEBUGCTL.

Overall, this behaviour is the more useful for callers, so I'll adjust
the MSR_DEBUGCTL case to only ever try inserting them once.

~Andrew

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

Reply via email to