[sean-jc:rev/get_set_guest_clock 112/112] arch/x86/kvm/x86.c:3429:66: error: 'struct kvm_vcpu_arch' has no member named 'hw_tsc_hz'; did you mean 'hw_tsc_khz'?
kernel test robot <[email protected]> Tue, 28 Jul 2026 05:31:44 +0200
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://github.com/sean-jc/linux rev/get_set_guest_clock head: 9796c520977c647c82515987b362119c7c4593ed commit: 9796c520977c647c82515987b362119c7c4593ed [112/112] KVM: x86: Add KVM_[GS]ET_CLOCK_GUEST for accurate KVM clock migration config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20260728/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260728/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All errors (new ones prefixed by >>): arch/x86/kvm/x86.c: In function 'kvm_vcpu_ioctl_get_clock_guest': >> arch/x86/kvm/x86.c:3429:66: error: 'struct kvm_vcpu_arch' has no member named 'hw_tsc_hz'; did you mean 'hw_tsc_khz'? 3429 | if (kvm_check_request(KVM_REQ_CLOCK_UPDATE, v) || !vcpu->hw_tsc_hz) { | ^~~~~~~~~ | hw_tsc_khz vim +3429 arch/x86/kvm/x86.c 3415 3416 3417 #ifdef CONFIG_X86_64 3418 static int kvm_vcpu_ioctl_get_clock_guest(struct kvm_vcpu *v, void __user *argp) 3419 { 3420 struct pvclock_vcpu_time_info hv_clock = {}; 3421 struct kvm_vcpu_arch *vcpu = &v->arch; 3422 struct kvm_arch *ka = &v->kvm->arch; 3423 unsigned int seq; 3424 3425 /* 3426 * If KVM_REQ_CLOCK_UPDATE is already pending, or if the pvclock 3427 * has never been generated at all, call kvm_guest_time_update(). 3428 */ > 3429 if (kvm_check_request(KVM_REQ_CLOCK_UPDATE, v) || !vcpu->hw_tsc_hz) { 3430 int idx = srcu_read_lock(&v->kvm->srcu); 3431 int ret = kvm_guest_time_update(v); 3432 3433 srcu_read_unlock(&v->kvm->srcu, idx); 3434 if (ret) 3435 return -EINVAL; 3436 } 3437 3438 /* 3439 * Reconstruct the pvclock from the master clock state, matching 3440 * exactly what kvm_guest_time_update() writes to the guest. 3441 */ 3442 do { 3443 seq = read_seqcount_begin(&ka->pvclock_sc); 3444 3445 if (!ka->use_master_clock) 3446 return -EINVAL; 3447 3448 hv_clock.tsc_timestamp = kvm_read_l1_tsc(v, ka->master_cycle_now); 3449 hv_clock.system_time = ka->master_kernel_ns + ka->kvmclock_offset; 3450 } while (read_seqcount_retry(&ka->pvclock_sc, seq)); 3451 3452 hv_clock.tsc_shift = vcpu->pvclock_tsc_shift; 3453 hv_clock.tsc_to_system_mul = vcpu->pvclock_tsc_mul; 3454 hv_clock.flags = PVCLOCK_TSC_STABLE_BIT; 3455 3456 if (copy_to_user(argp, &hv_clock, sizeof(hv_clock))) 3457 return -EFAULT; 3458 3459 return 0; 3460 } 3461 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki