Re: [PATCH] perf/x86/intel/pt: Don't die on VMXON

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

 



On Wed, Apr 06, 2016 at 02:10:49PM +0300, Alexander Shishkin wrote:
> >> +	/* may be already stopped by a PMI*/
> >> +	if (!(ctl & RTIT_CTL_TRACEEN))
> >> +		return;
> >> +
> >> +	ctl ^= RTIT_CTL_TRACEEN;
> >
> > Would that not be much less confusing when written like |= ?
> 
> This one's actually clearing TraceEn, see the if-not-set-leave in front
> of it, but that just goes to prove your point I guess. :)

Hehe, indeed. So much for pretending to be awake :-)


> How about this then:

Looks good, however:

> +	if (test_cpu_cap(&boot_cpu_data, X86_FEATURE_VMX)) {

Borislav tells me this ought to be boot_cpu_has(X86_FEATURE_VMX)

> +		/* Intel SDM, 36.5 "Tracing post-VMXON" */
> +		rdmsrl(MSR_IA32_VMX_MISC, reg);
> +		if (reg & BIT(14))
> +			pt_pmu.vmx = true;
> +	}
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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