• Jim Mattson's avatar
    KVM: x86/pmu: Use different raw event masks for AMD and Intel · 95b065bf
    Jim Mattson authored
    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: default avatarJim Mattson <jmattson@google.com>
    Message-Id: <20220308012452.3468611-1-jmattson@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    95b065bf
pmu_intel.c 20.5 KB