diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-10-15 15:24:18 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-10-15 15:24:18 +0300 |
commit | 88e4cd893f5f05de54a6e013a33c524d30fcad83 (patch) | |
tree | 46a80c0943553a75bfb7e330bec46923b2b500ec /arch/x86/kvm/svm | |
parent | 24422df3fb862b3b1a6791f72141e79724adc244 (diff) | |
parent | 73554b29bd70546c1a9efc9c160641ef1b849358 (diff) | |
download | linux-88e4cd893f5f05de54a6e013a33c524d30fcad83.tar.xz |
Merge tag 'kvm-x86-pmu-6.6-fixes' of https://github.com/kvm-x86/linux into HEAD
KVM x86/pmu fixes for 6.6:
- Truncate writes to PMU counters to the counter's width to avoid spurious
overflows when emulating counter events in software.
- Set the LVTPC entry mask bit when handling a PMI (to match Intel-defined
architectural behavior).
- Treat KVM_REQ_PMI as a wake event instead of queueing host IRQ work to
kick the guest out of emulated halt.
Diffstat (limited to 'arch/x86/kvm/svm')
-rw-r--r-- | arch/x86/kvm/svm/pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm/pmu.c b/arch/x86/kvm/svm/pmu.c index cef5a3d0abd0..373ff6a6687b 100644 --- a/arch/x86/kvm/svm/pmu.c +++ b/arch/x86/kvm/svm/pmu.c @@ -160,7 +160,7 @@ static int amd_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) /* MSR_PERFCTRn */ pmc = get_gp_pmc_amd(pmu, msr, PMU_TYPE_COUNTER); if (pmc) { - pmc->counter += data - pmc_read_counter(pmc); + pmc_write_counter(pmc, data); pmc_update_sample_period(pmc); return 0; } |