summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2023-11-10 05:28:51 +0300
committerSean Christopherson <seanjc@google.com>2024-02-01 20:35:48 +0300
commit004a0aa56edea3effc97bc90a620da1bcde5c63c (patch)
tree379a33ec1a69534c15209580c9debb48457ab0fd /Makefile
parentb31880ca2f41dc2196e31d97e498b0fa884c2b2a (diff)
downloadlinux-004a0aa56edea3effc97bc90a620da1bcde5c63c.tar.xz
KVM: x86/pmu: Snapshot and clear reprogramming bitmap before reprogramming
Refactor the handling of the reprogramming bitmap to snapshot and clear to-be-processed bits before doing the reprogramming, and then explicitly set bits for PMCs that need to be reprogrammed (again). This will allow adding a macro to iterate over all valid PMCs without having to add special handling for the reprogramming bit, which (a) can have bits set for non-existent PMCs and (b) needs to clear such bits to avoid wasting cycles in perpetuity. Note, the existing behavior of clearing bits after reprogramming does NOT have a race with kvm_vm_ioctl_set_pmu_event_filter(). Setting a new PMU filter synchronizes SRCU _before_ setting the bitmap, i.e. guarantees that the vCPU isn't in the middle of reprogramming with a stale filter prior to setting the bitmap. Link: https://lore.kernel.org/r/20231110022857.1273836-5-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions