]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: x86/pmu: Handle emulated instruction for mediated vPMU
authorDapeng Mi <dapeng1.mi@linux.intel.com>
Sat, 6 Dec 2025 00:17:05 +0000 (16:17 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 8 Jan 2026 19:52:12 +0000 (11:52 -0800)
commit283a5aa57b2223abf2f73afcc714c4d4553660f2
tree8dd131de56d6b3c6da0831b5dabf2485b4a50464
parentf7a65e58d64340c3c0e390ea4e1c4857cd451f1f
KVM: x86/pmu: Handle emulated instruction for mediated vPMU

Mediated vPMU needs to accumulate the emulated instructions into counter
and load the counter into HW at vm-entry.

Moreover, if the accumulation leads to counter overflow, KVM needs to
update GLOBAL_STATUS and inject PMI into guest as well.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Mingwei Zhang <mizhang@google.com>
Tested-by: Xudong Hao <xudong.hao@intel.com>
Tested-by: Manali Shukla <manali.shukla@amd.com>
Link: https://patch.msgid.link/20251206001720.468579-30-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/pmu.c