public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Woodhouse <dwmw2@infradead.org>, kvm@vger.kernel.org
Cc: kbuild-all@lists.01.org, Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	Joao Martins <joao.m.martins@oracle.com>,
	Ankur Arora <ankur.a.arora@oracle.com>,
	KarimAllah Raslan <karahmed@amazon.com>
Subject: Re: [PATCH v2 4/6] KVM: Fix kvm_map_gfn()/kvm_unmap_gfn() to take a kvm as their names imply
Date: Wed, 3 Nov 2021 06:33:02 +0800	[thread overview]
Message-ID: <202111030619.3X7gNeMQ-lkp@intel.com> (raw)
In-Reply-To: <20211101190314.17954-5-dwmw2@infradead.org>

[-- Attachment #1: Type: text/plain, Size: 8223 bytes --]

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@intel.com>

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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66021 bytes --]

  parent reply	other threads:[~2021-11-02 22:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 19:03 [PATCH v2 0/6] KVM: x86/xen: Add in-kernel Xen event channel delivery David Woodhouse
2021-11-01 19:03 ` [PATCH v2 1/6] KVM: x86/xen: Fix get_attr of KVM_XEN_ATTR_TYPE_SHARED_INFO David Woodhouse
2021-11-01 19:03 ` [PATCH v2 2/6] KVM: selftests: Add event channel upcall support to xen_shinfo_test David Woodhouse
2021-11-01 19:03 ` [PATCH v2 3/6] KVM: x86/xen: Use sizeof_field() instead of open-coding it David Woodhouse
2021-11-01 19:03 ` [PATCH v2 4/6] KVM: Fix kvm_map_gfn()/kvm_unmap_gfn() to take a kvm as their names imply David Woodhouse
2021-11-02  3:12   ` kernel test robot
2021-11-02 22:33   ` kernel test robot [this message]
2021-11-01 19:03 ` [PATCH v2 5/6] KVM: x86/xen: Maintain valid mapping of Xen shared_info page David Woodhouse
2021-11-02  1:23   ` kernel test robot
2021-11-04 19:05   ` David Woodhouse
2021-11-01 19:03 ` [PATCH v2 6/6] KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and event channel delivery David Woodhouse
2021-11-02  0:25   ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202111030619.3X7gNeMQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ankur.a.arora@oracle.com \
    --cc=dwmw2@infradead.org \
    --cc=jmattson@google.com \
    --cc=joao.m.martins@oracle.com \
    --cc=joro@8bytes.org \
    --cc=karahmed@amazon.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox