lkml.org 
[lkml]   [2017]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 7/9] KVM: x86: Implement Intel Processor Trace MSRs read/write
From
Date
On 27/11/2017 21:24, Luwei Kang wrote:
> + case MSR_IA32_RTIT_ADDR0_A ... MSR_IA32_RTIT_ADDR3_B: {
> + u32 eax, ebx, ecx, edx;
> +
> + cpuid_count(0x14, 1, &eax, &ebx, &ecx, &edx);

Please cache the cpuid_count result, or do the cpuid_count after testing
vmx_pt_supported() (which you can use instead of going through kvm_x86_ops).

Thanks,

Paolo

> + if (!kvm_x86_ops->pt_supported() || msrs_to_save[i] -
> + MSR_IA32_RTIT_ADDR0_A >= (eax & 0x7))
> + continue;
> + break;

\
 
 \ /
  Last update: 2017-11-30 13:21    [W:0.138 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site