Re: [PATCH v3 12/18] KVM: x86/pmu: Emulate IA32_PERF_GLOBAL_INUSE MSR
From: Jim Mattson
Date: Mon Nov 09 2026 - 15:55:46 EST
On Thu, Nov 5, 2026 at 5:50 PM Zide Chen <zide.chen@xxxxxxxxx> wrote:
>
> Intel PerfMon v4 introduces IA32_PERF_GLOBAL_INUSE (0x392) to track
> which counters and the PMI are currently claimed by software agents,
> allowing independent software agents to check counter availability
> without a shared scheduler arbitrating between them.
>
> IA32_PERF_GLOBAL_INUSE is a read-only MSR, and any write attempt
> results in a #GP. The MSR is not part of the VM state, so it does
> not need to be advertised to userspace, nor saved and restored during
> live migration.
>
> Always intercept IA32_PERF_GLOBAL_INUSE to prevent the guest from
> erroneously observing filtered fixed counters as idle.
>
> Originally-by: Yang Weijiang <weijiang.yang@xxxxxxxxx>
> Signed-off-by: Zide Chen <zide.chen@xxxxxxxxx>
Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>