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

Re: [Xen-devel] [PATCH 3/4] VMX: allow RTM advanced debugging to be used by guests



>>> On 12.08.14 at 12:08, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 12/08/14 10:17, Jan Beulich wrote:
>> All that is needed here is allowing the respective DebugCtl MSR bit to
>> be set by the guest.
>>
>> At once - even if PV guests can't currently use it due to missing
>> DebugCtl MSR virtualization - make the respective adjustments to
>> debugreg.h.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>> @@ -2246,6 +2246,8 @@ static int vmx_msr_write_intercept(unsig
>>          int i, rc = 0;
>>          uint64_t supported = IA32_DEBUGCTLMSR_LBR | IA32_DEBUGCTLMSR_BTF;
>>  
>> +        if ( boot_cpu_has(X86_FEATURE_RTM) )
>> +            supported |= IA32_DEBUGCTLMSR_RTM;
> 
> This supported bitmask is runtime constant.  Is it worth precalculating
> it, rather than reevaluating each time DEBUGCTL is written to?

If the calculation was expensive ...

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®.