lkml.org 
[lkml]   [2023]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 07/12] KVM: x86/cpuid: Use fast return for cpuid "0xa" leaf when !enable_pmu
From
KVM: x86: Explicitly zero cpuid "0xa" leaf when PMU is disabled

On Tue, Feb 14, 2023, Like Xu wrote:
> From: Like Xu <likexu@tencent.com>
>
> Add an explicit !enable_pmu check as relying on kvm_pmu_cap to be
> zeroed isn't obvious. Although when !enable_pmu, KVM will have
> zero-padded kvm_pmu_cap to do subsequent cpuid leaf assignments,
> one extra branch instruction saves a few subsequent zero-assignment
> instructions, speeding things up a bit.

Drop the performance blurb, as I stated multiple times, optimizing this code is
a non-goal.

\
 
 \ /
  Last update: 2023-04-07 02:00    [W:0.181 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site