函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\kvmclock.c Create Date:2022-07-27 09:44:25
Last Modify:2020-03-18 12:41:45 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kvmclock_init

函数原型:void __init kvmclock_init(void)

返回类型:void

参数:

312  如果非kvm_para_available()或非kvmclock则返回
315  如果kvm_para_has_feature(This indicates that the new set of kvmclock msrs* are available. The use of 0x11 and 0x12 is deprecated)则
316  msr_kvm_system_time等于MSR_KVM_SYSTEM_TIME_NEW
317  msr_kvm_wall_clock等于Custom MSRs falls in the range 0x4b564d00-0x4b564dff
318  否则如果非kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE)则
319  返回
322  如果puhp_setup_state - Setup hotplug state callbacks with calling the callbacks*@state: The state for which the calls are installed*@name: Name of the callback (will be used in debug output)*@startup: startup callback function*@teardown: teardown callback 小于0则
324  返回
327  打印信息("kvm-clock: Using msrs %x and %x", msr_kvm_system_time, msr_kvm_wall_clock)
330  抢占保护下的写CPU(hv_clock_per_cpu, & hv_clock_boot[0])
331  kvm_register_clock("primary cpu clock")
332  pvclock_set_pvti_cpu0_va(hv_clock_boot)
334  如果kvm_para_has_feature(The last 8 bits are used to indicate how to interpret the flags field* in pvclock structure. If no bits are set, all flags are ignored.)则pvclock_set_flags(PVCLOCK_TSC_STABLE_BIT)
337  flags等于pvclock_read_flags( & pvti)
338  kvm_sched_clock_init(flags & PVCLOCK_TSC_STABLE_BIT)
340  calibrate_tsc等于If we don't do that, there is the possibility that the guest* will calibrate under heavy load - thus, getting a lower lpj -* and execute the delays themselves without load
341  calibrate_cpu等于If we don't do that, there is the possibility that the guest* will calibrate under heavy load - thus, getting a lower lpj -* and execute the delays themselves without load
342  get_wallclock等于The wallclock is the time of day when we booted. Since then, some time may* have elapsed since the hypervisor wrote the data. So we try to account for* that with system time
343  set_wallclock等于kvm_set_wallclock
347  save_sched_clock_state等于kvm_save_sched_clock_state
348  restore_sched_clock_state等于kvm_restore_sched_clock_state
349  shutdown等于kvm_shutdown
351  crash_shutdown等于After the clock is registered, the host will keep writing to the* registered memory location. If the guest happens to shutdown, this memory* won't be valid. In cases like kexec, in which you install a new kernel, this
353  kvm_get_preset_lpj()
363  如果boot_cpu_has(TSC ticks at a constant rate )且boot_cpu_has(TSC does not stop in C states )且非check_tsc_unstable()则rating等于299
368  clocksource_register_hz( & kvm_clock, NSEC_PER_SEC)
369  name等于"KVM"
调用者
名称描述
kvm_init_platform