Hi David, I love your patch! Yet something to improve: [auto build test ERROR on mst-vhost/linux-next] [also build test ERROR on linus/master v5.15 next-20211102] [cannot apply to kvm/queue] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/David-Woodhouse/KVM-x86-xen-Add-in-kernel-Xen-event-channel-delivery/20211102-035038 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next config: i386-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/e0d8e28314e04209c373131aa5ca6bf57c9f1857 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review David-Woodhouse/KVM-x86-xen-Add-in-kernel-Xen-event-channel-delivery/20211102-035038 git checkout e0d8e28314e04209c373131aa5ca6bf57c9f1857 # save the attached .config to linux build tree make W=1 ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): arch/x86/kvm/x86.c: In function 'record_steal_time': >> arch/x86/kvm/x86.c:3210:18: error: passing argument 1 of 'kvm_map_gfn' from incompatible pointer type [-Werror=incompatible-pointer-types] 3210 | if (kvm_map_gfn(vcpu, vcpu->arch.st.msr_val >> PAGE_SHIFT, | ^~~~ | | | struct kvm_vcpu * In file included from arch/x86/kvm/x86.c:19: include/linux/kvm_host.h:946:29: note: expected 'struct kvm *' but argument is of type 'struct kvm_vcpu *' 946 | int kvm_map_gfn(struct kvm *kvm, gfn_t gfn, struct kvm_host_map *map, | ~~~~~~~~~~~~^~~ >> arch/x86/kvm/x86.c:3249:16: error: passing argument 1 of 'kvm_unmap_gfn' from incompatible pointer type [-Werror=incompatible-pointer-types] 3249 | kvm_unmap_gfn(vcpu, &map, &vcpu->arch.st.cache, true, false); | ^~~~ | | | struct kvm_vcpu * In file included from arch/x86/kvm/x86.c:19: include/linux/kvm_host.h:950:31: note: expected 'struct kvm *' but argument is of type 'struct kvm_vcpu *' 950 | int kvm_unmap_gfn(struct kvm *kvm, struct kvm_host_map *map, | ~~~~~~~~~~~~^~~ arch/x86/kvm/x86.c: In function 'kvm_steal_time_set_preempted': arch/x86/kvm/x86.c:4297:18: error: passing argument 1 of 'kvm_map_gfn' from incompatible pointer type [-Werror=incompatible-pointer-types] 4297 | if (kvm_map_gfn(vcpu, vcpu->arch.st.msr_val >> PAGE_SHIFT, &map, | ^~~~ | | | struct kvm_vcpu * In file included from arch/x86/kvm/x86.c:19: include/linux/kvm_host.h:946:29: note: expected 'struct kvm *' but argument is of type 'struct kvm_vcpu *' 946 | int kvm_map_gfn(struct kvm *kvm, gfn_t gfn, struct kvm_host_map *map, | ~~~~~~~~~~~~^~~ arch/x86/kvm/x86.c:4306:16: error: passing argument 1 of 'kvm_unmap_gfn' from incompatible pointer type [-Werror=incompatible-pointer-types] 4306 | kvm_unmap_gfn(vcpu, &map, &vcpu->arch.st.cache, true, true); | ^~~~ | | | struct kvm_vcpu * In file included from arch/x86/kvm/x86.c:19: include/linux/kvm_host.h:950:31: note: expected 'struct kvm *' but argument is of type 'struct kvm_vcpu *' 950 | int kvm_unmap_gfn(struct kvm *kvm, struct kvm_host_map *map, | ~~~~~~~~~~~~^~~ cc1: all warnings being treated as errors vim +/kvm_map_gfn +3210 arch/x86/kvm/x86.c 0baedd792713063 Vitaly Kuznetsov 2020-03-25 3195 c9aaa8957f203bd Glauber Costa 2011-07-11 3196 static void record_steal_time(struct kvm_vcpu *vcpu) c9aaa8957f203bd Glauber Costa 2011-07-11 3197 { b043138246a4106 Boris Ostrovsky 2019-12-05 3198 struct kvm_host_map map; b043138246a4106 Boris Ostrovsky 2019-12-05 3199 struct kvm_steal_time *st; b043138246a4106 Boris Ostrovsky 2019-12-05 3200 30b5c851af7991a David Woodhouse 2021-03-01 3201 if (kvm_xen_msr_enabled(vcpu->kvm)) { 30b5c851af7991a David Woodhouse 2021-03-01 3202 kvm_xen_runstate_set_running(vcpu); 30b5c851af7991a David Woodhouse 2021-03-01 3203 return; 30b5c851af7991a David Woodhouse 2021-03-01 3204 } 30b5c851af7991a David Woodhouse 2021-03-01 3205 c9aaa8957f203bd Glauber Costa 2011-07-11 3206 if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) c9aaa8957f203bd Glauber Costa 2011-07-11 3207 return; c9aaa8957f203bd Glauber Costa 2011-07-11 3208 b043138246a4106 Boris Ostrovsky 2019-12-05 3209 /* -EAGAIN is returned in atomic context so we can just return. */ b043138246a4106 Boris Ostrovsky 2019-12-05 @3210 if (kvm_map_gfn(vcpu, vcpu->arch.st.msr_val >> PAGE_SHIFT, b043138246a4106 Boris Ostrovsky 2019-12-05 3211 &map, &vcpu->arch.st.cache, false)) c9aaa8957f203bd Glauber Costa 2011-07-11 3212 return; c9aaa8957f203bd Glauber Costa 2011-07-11 3213 b043138246a4106 Boris Ostrovsky 2019-12-05 3214 st = map.hva + b043138246a4106 Boris Ostrovsky 2019-12-05 3215 offset_in_page(vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS); b043138246a4106 Boris Ostrovsky 2019-12-05 3216 f38a7b75267f1fb Wanpeng Li 2017-12-12 3217 /* f38a7b75267f1fb Wanpeng Li 2017-12-12 3218 * Doing a TLB flush here, on the guest's behalf, can avoid f38a7b75267f1fb Wanpeng Li 2017-12-12 3219 * expensive IPIs. f38a7b75267f1fb Wanpeng Li 2017-12-12 3220 */ 66570e966dd9cb4 Oliver Upton 2020-08-18 3221 if (guest_pv_has(vcpu, KVM_FEATURE_PV_TLB_FLUSH)) { af3511ff7fa2107 Lai Jiangshan 2021-06-01 3222 u8 st_preempted = xchg(&st->preempted, 0); af3511ff7fa2107 Lai Jiangshan 2021-06-01 3223 b382f44e98506bc Wanpeng Li 2019-08-05 3224 trace_kvm_pv_tlb_flush(vcpu->vcpu_id, af3511ff7fa2107 Lai Jiangshan 2021-06-01 3225 st_preempted & KVM_VCPU_FLUSH_TLB); af3511ff7fa2107 Lai Jiangshan 2021-06-01 3226 if (st_preempted & KVM_VCPU_FLUSH_TLB) 0baedd792713063 Vitaly Kuznetsov 2020-03-25 3227 kvm_vcpu_flush_tlb_guest(vcpu); 1eff0ada88b48e4 Wanpeng Li 2021-05-18 3228 } else { 1eff0ada88b48e4 Wanpeng Li 2021-05-18 3229 st->preempted = 0; 66570e966dd9cb4 Oliver Upton 2020-08-18 3230 } 0b9f6c4615c993d Pan Xinhui 2016-11-02 3231 a6bd811f1209fe1 Boris Ostrovsky 2019-12-06 3232 vcpu->arch.st.preempted = 0; 35f3fae17849793 Wanpeng Li 2016-05-03 3233 b043138246a4106 Boris Ostrovsky 2019-12-05 3234 if (st->version & 1) b043138246a4106 Boris Ostrovsky 2019-12-05 3235 st->version += 1; /* first time write, random junk */ 35f3fae17849793 Wanpeng Li 2016-05-03 3236 b043138246a4106 Boris Ostrovsky 2019-12-05 3237 st->version += 1; 35f3fae17849793 Wanpeng Li 2016-05-03 3238 35f3fae17849793 Wanpeng Li 2016-05-03 3239 smp_wmb(); 35f3fae17849793 Wanpeng Li 2016-05-03 3240 b043138246a4106 Boris Ostrovsky 2019-12-05 3241 st->steal += current->sched_info.run_delay - c54cdf141c40a51 Liang Chen 2016-03-16 3242 vcpu->arch.st.last_steal; c54cdf141c40a51 Liang Chen 2016-03-16 3243 vcpu->arch.st.last_steal = current->sched_info.run_delay; 35f3fae17849793 Wanpeng Li 2016-05-03 3244 35f3fae17849793 Wanpeng Li 2016-05-03 3245 smp_wmb(); 35f3fae17849793 Wanpeng Li 2016-05-03 3246 b043138246a4106 Boris Ostrovsky 2019-12-05 3247 st->version += 1; c9aaa8957f203bd Glauber Costa 2011-07-11 3248 b043138246a4106 Boris Ostrovsky 2019-12-05 @3249 kvm_unmap_gfn(vcpu, &map, &vcpu->arch.st.cache, true, false); c9aaa8957f203bd Glauber Costa 2011-07-11 3250 } c9aaa8957f203bd Glauber Costa 2011-07-11 3251 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip