[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82D7661F83C1A047AF7DC287873BF1E167E37591@SHSMSX101.ccr.corp.intel.com>
Date: Tue, 14 Nov 2017 07:01:53 +0000
From: "Kang, Luwei" <luwei.kang@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
CC: "rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Chao Peng <chao.p.peng@...ux.intel.com>
Subject: RE: [patch v2 8/8] KVM: x86: Disable intercept for Intel processor
trace MSRs
> > + 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:
> >
Powered by blists - more mailing lists