diff options
author | Isaku Yamahata <[email protected]> | 2024-04-25 15:06:59 -0700 |
---|---|---|
committer | Sean Christopherson <[email protected]> | 2024-06-05 06:18:25 -0700 |
commit | f9e1cbf1805e14688f6175b688c0a8216bf67a11 (patch) | |
tree | c800a58dcf6eb3afd9b8663d7a785aa21c61360b /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 82897db91215d57caefdfacfc2f5e3ef9cf31fe3 (diff) |
KVM: x86: hyper-v: Calculate APIC bus frequency for Hyper-V
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 <[email protected]>
Signed-off-by: Isaku Yamahata <[email protected]>
Reviewed-by: Maxim Levitsky <[email protected]>
Reviewed-by: Xiaoyao Li <[email protected]>
Reviewed-by: Rick Edgecombe <[email protected]>
[reinette: rework changelog]
Signed-off-by: Reinette Chatre <[email protected]>
Link: https://lore.kernel.org/r/76a659d0898e87ebd73ee7c922f984a87a6ab370.1714081726.git.reinette.chatre@intel.com
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions