lkml.org 
[lkml]   [2023]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v8 07/26] KVM: x86/pmu: Apply "fast" RDPMC only to Intel PMUs
From

On 11/10/2023 10:51 PM, Sean Christopherson wrote:
> On Fri, Nov 10, 2023, Dapeng Mi wrote:
>> On 11/10/2023 10:12 AM, Sean Christopherson wrote:
>>> Move the handling of "fast" RDPMC instructions, which drop bits 63:31 of
>> 63:32?
> Oof, yeah.
>
>>> @@ -55,12 +59,17 @@ static struct kvm_pmc *intel_pmc_idx_to_pmc(struct kvm_pmu *pmu, int pmc_idx)
>>> }
>>> }
>>> +static u32 intel_rdpmc_get_masked_idx(struct kvm_pmu *pmu, u32 idx)
>> inline?
> No, for functions that are visible only to the local compilation unit, there's
> no reason to use "inline". "inline" is just a hint, and modern compilers are
> smart enough to inline functions when appropriate without a hint, e.g. gcc and
> clang inline this on all my configurations. Compilers may also ignore the hint,
> e.g. KASAN=y tends to produce some really amusing results.
>
> A longer explanation/rant here: https://lore.kernel.org/all/ZAdfX+S323JVWNZC@google.com

Got it. Thanks explanation.

\
 
 \ /
  Last update: 2023-11-20 13:57    [W:0.051 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site