Re: [PATCH v3 01/12] KVM: x86/pmu: Honor enable_vmware_backdoor for VMware pseudo-PMCs
From: Jim Mattson
Date: Wed Nov 11 2026 - 19:14:08 EST
On Tue, Nov 10, 2026 at 10:08 PM Zack Rusin <zack.rusin@xxxxxxxxxxxx> wrote:
>
> Check enable_vmware_backdoor before kvm_pmu_rdpmc() hands an RDPMC of a
> VMware pseudo-PMC to the VMware emulation.
>
> The pseudo-PMCs are part of the VMware backdoor, but only the
> emulator's check for RDPMC at CPL3 with CR4.PCE clear honors
> enable_vmware_backdoor. An RDPMC that KVM intercepts at CPL0, or at
> CPL3 with CR4.PCE set, returns the host TSC or time to any guest, even
> with the backdoor disabled. Inject #GP instead, as for any other
> invalid PMC index.
>
> Fixes: 2d7921c499af ("KVM: x86: Add support for VMware backdoor Pseudo-PMCs")
> Signed-off-by: Zack Rusin <zack.rusin@xxxxxxxxxxxx>
Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>