diff options
| author | Like Xu <[email protected]> | 2022-09-23 00:13:54 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2022-11-09 12:31:36 -0500 |
| commit | 68fb4757e8678894530ee0b15c29a3567207b970 (patch) | |
| tree | 711ba4357bd7d0f1fa7266f7ca36ca1820a3205e /include/linux | |
| parent | dcbb816a2842e41d3ec22605c6760837d800b20a (diff) | |
KVM: x86/pmu: Defer reprogram_counter() to kvm_pmu_handle_event()
Batch reprogramming PMU counters by setting KVM_REQ_PMU and thus
deferring reprogramming kvm_pmu_handle_event() to avoid reprogramming
a counter multiple times during a single VM-Exit.
Deferring programming will also allow KVM to fix a bug where immediately
reprogramming a counter can result in sleeping (taking a mutex) while
interrupts are disabled in the VM-Exit fastpath.
Introduce kvm_pmu_request_counter_reprogam() to make it obvious that
KVM is _requesting_ a reprogram and not actually doing the reprogram.
Opportunistically refine related comments to avoid misunderstandings.
Signed-off-by: Like Xu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions