OrangePi_CM5/arch/x86/kvm/svm
Kyle Huey fbb7c61e76 KVM: x86/svm: Account for family 17h event renumberings in amd_pmc_perf_hw_id
commit 5eb849322d7f7ae9d5c587c7bc3b4f7c6872cd2f upstream.

Zen renumbered some of the performance counters that correspond to the
well known events in perf_hw_id. This code in KVM was never updated for
that, so guest that attempt to use counters on Zen that correspond to the
pre-Zen perf_hw_id values will silently receive the wrong values.

This has been observed in the wild with rr[0] when running in Zen 3
guests. rr uses the retired conditional branch counter 00d1 which is
incorrectly recognized by KVM as PERF_COUNT_HW_STALLED_CYCLES_BACKEND.

[0] https://rr-project.org/

Signed-off-by: Kyle Huey <me@kylehuey.com>
Message-Id: <20220503050136.86298-1-khuey@kylehuey.com>
Cc: stable@vger.kernel.org
[Check guest family, not host. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-12 12:25:30 +02:00
..
avic.c KVM: SVM: fix panic on out-of-bounds guest IRQ 2022-04-08 14:40:39 +02:00
nested.c KVM: x86: Forcibly leave nested virt when SMM state is toggled 2022-02-05 12:37:55 +01:00
pmu.c KVM: x86/svm: Account for family 17h event renumberings in amd_pmc_perf_hw_id 2022-05-12 12:25:30 +02:00
sev.c KVM: SVM: Fix off-by-one indexing when nullifying last used SEV VMCB 2021-08-15 14:00:24 +02:00
svm.c KVM: SVM: Never reject emulation due to SMAP errata for !SEV guests 2022-02-23 12:01:03 +01:00
svm.h KVM: x86: Forcibly leave nested virt when SMM state is toggled 2022-02-05 12:37:55 +01:00
vmenter.S
…