* [dwmw2:clocks 15/15] arch/x86/kvm/x86.c:2574:33: error: implicit declaration of function 'kvm_use_master_clock'
@ 2024-04-28 11:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-28 11:21 UTC (permalink / raw)
To: David Woodhouse; +Cc: oe-kbuild-all
tree: git://git.infradead.org/users/dwmw2/linux clocks
head: ef986166676fc60d0f597cab97a08d4fb232f83b
commit: ef986166676fc60d0f597cab97a08d4fb232f83b [15/15] KVM: x86: Factor out kvm_use_master_clock()
config: x86_64-randconfig-016-20240428 (https://download.01.org/0day-ci/archive/20240428/202404281959.AcCjYVJq-lkp@intel.com/config)
compiler: gcc-12 (Ubuntu 12.3.0-9ubuntu2) 12.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240428/202404281959.AcCjYVJq-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404281959.AcCjYVJq-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/x86/kvm/x86.c:2521:34: error: unknown type name 'strut'; did you mean 'struct'?
2521 | static bool kvm_use_master_clock(strut kvm *kvm)
| ^~~~~
| struct
arch/x86/kvm/x86.c: In function 'kvm_track_tsc_matching':
>> arch/x86/kvm/x86.c:2574:33: error: implicit declaration of function 'kvm_use_master_clock' [-Werror=implicit-function-declaration]
2574 | bool use_master_clock = kvm_use_master_clock(kvm) &&
| ^~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/x86.c:2574:54: error: 'kvm' undeclared (first use in this function)
2574 | bool use_master_clock = kvm_use_master_clock(kvm) &&
| ^~~
arch/x86/kvm/x86.c:2574:54: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
vim +/kvm_use_master_clock +2574 arch/x86/kvm/x86.c
2541
2542 static void kvm_track_tsc_matching(struct kvm_vcpu *vcpu)
2543 {
2544 #ifdef CONFIG_X86_64
2545 struct kvm_arch *ka = &vcpu->kvm->arch;
2546 struct pvclock_gtod_data *gtod = &pvclock_gtod_data;
2547 struct kvm_vcpu *v;
2548 unsigned long i;
2549 bool matched = true;
2550
2551 lockdep_assert_held(&vcpu->kvm->arch.tsc_write_lock);
2552
2553 /*
2554 * When called via kvm_arch_vcpu_create() for a new vCPU, the count
2555 * in kvm->online_vcpus will not yet have been incremented and the
2556 * kvm_for_each_vcpu() loop will not iterate over 'vcpu'.
2557 *
2558 * The right thing still happens in that case, because a match will
2559 * be found only if the new vCPU's TSC is at the same rate as *all*
2560 * the existing vCPUs' TSCs.
2561 */
2562 kvm_for_each_vcpu(i, v, vcpu->kvm) {
2563 if (v->arch.virtual_tsc_khz != vcpu->arch.virtual_tsc_khz) {
2564 matched = false;
2565 break;
2566 }
2567 }
2568 ka->all_vcpus_matched_tsc = matched;
2569
2570 /*
2571 * To use the masterclock, the host clocksource must be based on TSC
2572 * and all vCPUs must have matching TSC frequencies.
2573 */
> 2574 bool use_master_clock = kvm_use_master_clock(kvm) &&
2575 gtod_is_based_on_tsc(gtod->clock.vclock_mode);
2576
2577 /*
2578 * Request a masterclock update if the masterclock needs to be toggled
2579 * on/off.
2580 */
2581 if ((ka->use_master_clock != use_master_clock))
2582 kvm_make_request(KVM_REQ_MASTERCLOCK_UPDATE, vcpu);
2583
2584 trace_kvm_track_tsc(vcpu->vcpu_id, ka->all_vcpus_matched_tsc,
2585 atomic_read(&vcpu->kvm->online_vcpus),
2586 ka->use_master_clock, gtod->clock.vclock_mode);
2587 #endif
2588 }
2589
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-28 11:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28 11:21 [dwmw2:clocks 15/15] arch/x86/kvm/x86.c:2574:33: error: implicit declaration of function 'kvm_use_master_clock' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.