lkml.org 
[lkml]   [2017]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [patch v2 8/8] KVM: x86: Disable intercept for Intel processor trace MSRs
Date
> > +	if (pt_mode == PT_MODE_HOST_GUEST) {
> > + u32 i, eax, ebx, ecx, edx;
> > +
> > + cpuid_count(0x14, 1, &eax, &ebx, &ecx, &edx);
> > + vmx_disable_intercept_for_msr(MSR_IA32_RTIT_STATUS, false);
> > + vmx_disable_intercept_for_msr(MSR_IA32_RTIT_OUTPUT_BASE, false);
> > + vmx_disable_intercept_for_msr(MSR_IA32_RTIT_OUTPUT_MASK, false);
> > + vmx_disable_intercept_for_msr(MSR_IA32_RTIT_CR3_MATCH, false);
> > + for (i = 0; i < (eax & 0x7); i++)
> > + vmx_disable_intercept_for_msr(MSR_IA32_RTIT_ADDR0_A + i,
> > + false);
> > + }
> > +
>
> As I mentioned earlier, this probably makes vmentry/vmexit too expensive when guests are not using processor tracing. I would do it only if guest TRACEEN=1 (since anyway the values have to be correct if guest TRACEEN=1, and a change in TRACEEN always causes a vmexit).
>

Will change in next version.

Thanks,
Luwei Kang

>
> > return alloc_kvm_area();
> >
> > out:
> >

\
 
 \ /
  Last update: 2017-11-14 08:02    [W:0.021 / U:1.720 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site