lkml.org 
[lkml]   [2024]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V4 1/4] KVM: x86: hyper-v: Calculate APIC bus frequency for Hyper-V
Date
On Thu, 2024-03-21 at 09:37 -0700, Reinette Chatre wrote:
> From: Isaku Yamahata <isaku.yamahata@intel.com>
>
> Remove APIC_BUS_FREQUENCY and calculate it based on nanoseconds per APIC
> bus cycle.  APIC_BUS_FREQUENCY is used only for HV_X64_MSR_APIC_FREQUENCY.
> The MSR is not frequently read, calculate it every time.
>
> There are two constants related to the APIC bus frequency:
> APIC_BUS_FREQUENCY and APIC_BUS_CYCLE_NS.
> Only one value is required because one can be calculated from the other:
>    APIC_BUS_CYCLES_NS = 1000 * 1000 * 1000 / APIC_BUS_FREQUENCY.
>
> Remove APIC_BUS_FREQUENCY and instead calculate it when needed.
> This prepares for support of configurable APIC bus frequency by
> requiring to change only a single variable.
>
> Suggested-by: Maxim Levitsky <maximlevitsky@gmail.com>
> Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
> Reviewed-by: Maxim Levitsky <maximlevitsky@gmail.com>
> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
> [reinette: rework changelog]
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>

Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
\
 
 \ /
  Last update: 2024-04-16 19:08    [W:0.370 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site