tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 448a7c1b3e0654d6b6801c216e7c265445a83a2f commit: faa35b0fcdefb1e5f2d05b0eeac12be32e69e566 [7130/7265] LoongArch: KVM: Add steal time support in kvm side config: loongarch-randconfig-002-20240403 (https://download.01.org/0day-ci/archive/20240403/202404030537.GbaKR7zc-lkp@i...) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240403/202404030537.GbaKR7zc-lkp@i...)
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/202404030537.GbaKR7zc-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/loongarch/kvm/vcpu.c: In function 'kvm_update_stolen_time':
arch/loongarch/kvm/vcpu.c:68:37: error: 'struct sched_info' has no member named 'run_delay'
68 | steal += current->sched_info.run_delay - | ^ arch/loongarch/kvm/vcpu.c:70:55: error: 'struct sched_info' has no member named 'run_delay' 70 | vcpu->arch.st.last_steal = current->sched_info.run_delay; | ^ -- arch/loongarch/kvm/exit.c: In function 'kvm_save_notify':
arch/loongarch/kvm/exit.c:764:63: error: 'struct sched_info' has no member named 'run_delay'
764 | vcpu->arch.st.last_steal = current->sched_info.run_delay; | ^
vim +68 arch/loongarch/kvm/vcpu.c
33 34 static void kvm_update_stolen_time(struct kvm_vcpu *vcpu) 35 { 36 struct kvm_steal_time __user *st; 37 struct gfn_to_hva_cache *ghc; 38 struct kvm_memslots *slots; 39 gpa_t gpa; 40 u64 steal; 41 u32 version; 42 43 ghc = &vcpu->arch.st.cache; 44 gpa = vcpu->arch.st.guest_addr; 45 if (!(gpa & KVM_STEAL_PHYS_VALID)) 46 return; 47 48 gpa &= KVM_STEAL_PHYS_MASK; 49 slots = kvm_memslots(vcpu->kvm); 50 if (slots->generation != ghc->generation || gpa != ghc->gpa) { 51 if (kvm_gfn_to_hva_cache_init(vcpu->kvm, ghc, gpa, 52 sizeof(*st))) { 53 ghc->gpa = INVALID_GPA; 54 return; 55 } 56 } 57 58 st = (struct kvm_steal_time __user *)ghc->hva; 59 unsafe_get_user(version, &st->version, out); 60 if (version & 1) 61 version += 1; 62 version += 1; 63 unsafe_put_user(version, &st->version, out); 64 /* Make sure st->version is written first */ 65 smp_wmb(); 66 67 unsafe_get_user(steal, &st->steal, out);
68 steal += current->sched_info.run_delay -
69 vcpu->arch.st.last_steal; 70 vcpu->arch.st.last_steal = current->sched_info.run_delay; 71 unsafe_put_user(steal, &st->steal, out); 72 73 /* Make sure st->steal is written first */ 74 smp_wmb(); 75 version += 1; 76 unsafe_put_user(version, &st->version, out); 77 out: 78 mark_page_dirty_in_slot(vcpu->kvm, ghc->memslot, gpa_to_gfn(ghc->gpa)); 79 } 80