Re: [PATCH 2/6] perf/x86/intel/pt: Stop tracing if VMXON has not yet happened
From: Peter Zijlstra
Date: Mon Nov 02 2026 - 06:17:43 EST
On Mon, Nov 02, 2026 at 01:04:59PM +0200, Adrian Hunter wrote:
> > It seems rather unfortunate to issue a RDMSR for state we fully control.
> > Surely we can track this?
>
> The RDMSR only happens on BDW and only when VMX is on and someone still
> tries to use Intel PT (even though no trace can be produced on BDW
> while VMX is on).
>
> There is a window between setting vmx_on and clearing TRACEEN. Dealing
> with that would be complicated, compared with reading the MSR.
So I thought we'd manually clear the thing before VMXON, but you're
saying VMXON itself will clobber that register? I stand by my previous
statement ;-)