RE: [patch v2 8/8] KVM: x86: Disable intercept for Intel processor trace MSRs

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

 



> > +	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:
> >





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux