Re: [PATCH v4 22/38] KVM: x86/pmu: Optimize intel/amd_pmu_refresh() helpers

2025-05-15 Thread Mi, Dapeng
On 5/16/2025 3:22 AM, Sean Christopherson wrote: > On Thu, May 15, 2025, Dapeng Mi wrote: >> On 5/15/2025 8:37 AM, Sean Christopherson wrote: diff --git a/arch/x86/kvm/svm/pmu.c b/arch/x86/kvm/svm/pmu.c index 153972e944eb..eba086ef5eca 100644 --- a/arch/x86/kvm/svm/pmu.c +++ b

Re: [PATCH v4 22/38] KVM: x86/pmu: Optimize intel/amd_pmu_refresh() helpers

2025-05-15 Thread Sean Christopherson
On Thu, May 15, 2025, Dapeng Mi wrote: > On 5/15/2025 8:37 AM, Sean Christopherson wrote: > >> diff --git a/arch/x86/kvm/svm/pmu.c b/arch/x86/kvm/svm/pmu.c > >> index 153972e944eb..eba086ef5eca 100644 > >> --- a/arch/x86/kvm/svm/pmu.c > >> +++ b/arch/x86/kvm/svm/pmu.c > >> @@ -198,12 +198,20 @@ sta

Re: [PATCH v4 22/38] KVM: x86/pmu: Optimize intel/amd_pmu_refresh() helpers

2025-05-14 Thread Mi, Dapeng
On 5/15/2025 8:37 AM, Sean Christopherson wrote: > This is not an optimization in any sane interpretation of that word. Yes, maybe clean up or bug fix is more accurate. > > On Mon, Mar 24, 2025, Mingwei Zhang wrote: >> From: Dapeng Mi >> >> Currently pmu->global_ctrl is initialized in the com

Re: [PATCH v4 22/38] KVM: x86/pmu: Optimize intel/amd_pmu_refresh() helpers

2025-05-14 Thread Sean Christopherson
This is not an optimization in any sane interpretation of that word. On Mon, Mar 24, 2025, Mingwei Zhang wrote: > From: Dapeng Mi > > Currently pmu->global_ctrl is initialized in the common kvm_pmu_refresh() > helper since both Intel and AMD CPUs set enable bits for all GP counters > for PERF_GL