Patch "KVM: x86/pmu: Use AMD64_RAW_EVENT_MASK for PERF_TYPE_RAW" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    KVM: x86/pmu: Use AMD64_RAW_EVENT_MASK for PERF_TYPE_RAW

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-x86-pmu-use-amd64_raw_event_mask-for-perf_type_r.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 25d82d425ee588b5393c1fd698ad484feb5f25f6
Author: Jim Mattson <jmattson@xxxxxxxxxx>
Date:   Wed Feb 2 17:48:13 2022 -0800

    KVM: x86/pmu: Use AMD64_RAW_EVENT_MASK for PERF_TYPE_RAW
    
    [ Upstream commit 710c476514313c74045c41c0571bb5178fd16e3d ]
    
    AMD's event select is 3 nybbles, with the high nybble in bits 35:32 of
    a PerfEvtSeln MSR. Don't mask off the high nybble when configuring a
    RAW perf event.
    
    Fixes: ca724305a2b0 ("KVM: x86/vPMU: Implement AMD vPMU code for KVM")
    Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
    Message-Id: <20220203014813.2130559-2-jmattson@xxxxxxxxxx>
    Reviewed-by: David Dunn <daviddunn@xxxxxxxxxx>
    Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c
index acc8d217f6565..ad3d39c00d7fc 100644
--- a/arch/x86/kvm/pmu.c
+++ b/arch/x86/kvm/pmu.c
@@ -171,7 +171,7 @@ void reprogram_gp_counter(struct kvm_pmc *pmc, u64 eventsel)
 	}
 
 	if (type == PERF_TYPE_RAW)
-		config = eventsel & X86_RAW_EVENT_MASK;
+		config = eventsel & AMD64_RAW_EVENT_MASK;
 
 	pmc_reprogram_counter(pmc, type, config,
 			      !(eventsel & ARCH_PERFMON_EVENTSEL_USR),



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux