aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2023-11-10 02:28:53 +0000
committerSean Christopherson <[email protected]>2024-02-01 17:35:48 +0000
commitd2b321ea9380564510d281d45ccd2b424da14e7f (patch)
tree8f2e98b5310b214113728440196d7dc3ed12dc80 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
parentKVM: x86/pmu: Add macros to iterate over all PMCs given a bitmap (diff)
downloadkernel-d2b321ea9380564510d281d45ccd2b424da14e7f.tar.gz
kernel-d2b321ea9380564510d281d45ccd2b424da14e7f.zip
KVM: x86/pmu: Process only enabled PMCs when emulating events in software
Mask off disabled counters based on PERF_GLOBAL_CTRL *before* iterating over PMCs to emulate (branch) instruction required events in software. In the common case where the guest isn't utilizing the PMU, pre-checking for enabled counters turns a relatively expensive search into a few AND uops and a Jcc. Sadly, PMUs without PERF_GLOBAL_CTRL, e.g. most existing AMD CPUs, are out of luck as there is no way to check that a PMC isn't being used without checking the PMC's event selector. Cc: Konstantin Khorenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions