Re: [PATCH 14/15] KVM: x86/pmu: Advertise PerfMon version 5 on Intel hosts

From: Jim Mattson

Date: Thu Jul 23 2026 - 23:20:38 EST


On Thu, Jul 23, 2026 at 4:25 PM Chen, Zide <zide.chen@xxxxxxxxx> wrote:
>
> Currently KVM always injects #GP when the AnyThread bit is set.
>
> kvm_pmu_refresh(): pmu->reserved_bits = 0xffffffff00200000ull;
>
> I understand the concern, but I'm not aware of a better solution for
> PMUv3/4. Silently ignoring AnyThread would deviate from the
> architectural behavior and, more importantly, may give the guest the
> false impression that AnyThread is supported. Supporting AnyThread, on
> the other hand, has cross-VM information leakage concerns.

Don't support versions 3 or 4; they aren't virtualizable. Hosts with
PMU versions 3 or 4 just get vPMU version 2.