KVM: x86/pmu: Use different raw event masks for AMD and Intel
The third nybble of AMD's event select overlaps with Intel's IN_TX and IN_TXCP bits. Therefore, we can't use AMD64_RAW_EVENT_MASK on Intel platforms that support TSX. Declare a raw_event_mask in the kvm_pmu structure, initialize it in the vendor-specific pmu_refresh() functions, and use that mask for PERF_TYPE_RAW configurations in reprogram_gp_counter(). Fixes: 710c4765 ("KVM: x86/pmu: Use AMD64_RAW_EVENT_MASK for PERF_TYPE_RAW") Signed-off-by:Jim Mattson <jmattson@google.com> Message-Id: <20220308012452.3468611-1-jmattson@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- arch/x86/include/asm/kvm_host.h 1 addition, 0 deletionsarch/x86/include/asm/kvm_host.h
- arch/x86/kvm/pmu.c 2 additions, 1 deletionarch/x86/kvm/pmu.c
- arch/x86/kvm/svm/pmu.c 1 addition, 0 deletionsarch/x86/kvm/svm/pmu.c
- arch/x86/kvm/vmx/pmu_intel.c 1 addition, 0 deletionsarch/x86/kvm/vmx/pmu_intel.c
Please register or sign in to comment