projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
KVM: x86/pmu: Prevent zero period event from being repeatedly released
[platform/kernel/linux-starfive.git]
/
arch
/
x86
/
kvm
/
pmu.h
diff --git
a/arch/x86/kvm/pmu.h
b/arch/x86/kvm/pmu.h
index
85ff3c0
..
cdb9100
100644
(file)
--- a/
arch/x86/kvm/pmu.h
+++ b/
arch/x86/kvm/pmu.h
@@
-140,7
+140,8
@@
static inline u64 get_sample_period(struct kvm_pmc *pmc, u64 counter_value)
static inline void pmc_update_sample_period(struct kvm_pmc *pmc)
{
- if (!pmc->perf_event || pmc->is_paused)
+ if (!pmc->perf_event || pmc->is_paused ||
+ !is_sampling_event(pmc->perf_event))
return;
perf_event_period(pmc->perf_event,