Re: [Patch v5 5/7] KVM: Sending hyperlist to the host via hinting_vq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nitesh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on kvm/linux-next]
[also build test WARNING on v4.15-rc1 next-20171128]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/nilal-redhat-com/KVM-Guest-page-hinting/20171129-180331
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: i386-randconfig-x008-201748 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers//virtio/virtio_balloon.c:59:6: error: #elif with no expression
    #elif
         ^
   drivers//virtio/virtio_balloon.c: In function 'fill_balloon':
   drivers//virtio/virtio_balloon.c:220:19: error: 'struct virtio_balloon' has no member named 'inflate_vq'
      tell_host(vb, vb->inflate_vq);
                      ^~
   drivers//virtio/virtio_balloon.c: In function 'leak_balloon':
   drivers//virtio/virtio_balloon.c:270:19: error: 'struct virtio_balloon' has no member named 'deflate_vq'
      tell_host(vb, vb->deflate_vq);
                      ^~
   drivers//virtio/virtio_balloon.c: In function 'stats_handle_request':
   drivers//virtio/virtio_balloon.c:343:11: error: 'struct virtio_balloon' has no member named 'stats_vq'; did you mean 'stats'?
     vq = vb->stats_vq;
              ^~~~~~~~
              stats
   drivers//virtio/virtio_balloon.c: In function 'init_vqs':
   drivers//virtio/virtio_balloon.c:454:12: error: 'hinting_ack' undeclared (first use in this function)
               hinting_ack };
               ^~~~~~~~~~~
   drivers//virtio/virtio_balloon.c:454:12: note: each undeclared identifier is reported only once for each function it appears in
   drivers//virtio/virtio_balloon.c:480:4: error: 'struct virtio_balloon' has no member named 'inflate_vq'
     vb->inflate_vq = vqs[0];
       ^~
   drivers//virtio/virtio_balloon.c:480:2: warning: statement with no effect [-Wunused-value]
     vb->inflate_vq = vqs[0];
     ^~
   drivers//virtio/virtio_balloon.c:481:4: error: 'struct virtio_balloon' has no member named 'deflate_vq'
     vb->deflate_vq = vqs[1];
       ^~
   drivers//virtio/virtio_balloon.c:481:2: warning: statement with no effect [-Wunused-value]
     vb->deflate_vq = vqs[1];
     ^~
   drivers//virtio/virtio_balloon.c:483:5: error: 'struct virtio_balloon' has no member named 'hinting_vq'
      vb->hinting_vq = vqs[3];
        ^~
   drivers//virtio/virtio_balloon.c:483:3: warning: statement with no effect [-Wunused-value]
      vb->hinting_vq = vqs[3];
      ^~
   drivers//virtio/virtio_balloon.c:487:7: error: 'struct virtio_balloon' has no member named 'stats_vq'; did you mean 'stats'?
      vb->stats_vq = vqs[2];
          ^~~~~~~~
          stats
   drivers//virtio/virtio_balloon.c:487:3: warning: statement with no effect [-Wunused-value]
      vb->stats_vq = vqs[2];
      ^~
   In file included from include/linux/string.h:6:0,
                    from include/linux/scatterlist.h:5,
                    from include/linux/virtio.h:7,
                    from drivers//virtio/virtio_balloon.c:22:
   drivers//virtio/virtio_balloon.c:496:32: error: 'struct virtio_balloon' has no member named 'stats_vq'; did you mean 'stats'?
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
                                   ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers//virtio/virtio_balloon.c:496:3: note: in expansion of macro 'if'
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
      ^~
   drivers//virtio/virtio_balloon.c:496:28: error: passing argument 1 of 'virtqueue_add_outbuf' from incompatible pointer type [-Werror=incompatible-pointer-types]
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
                               ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers//virtio/virtio_balloon.c:496:3: note: in expansion of macro 'if'
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
      ^~
   In file included from drivers//virtio/virtio_balloon.c:22:0:
   include/linux/virtio.h:38:5: note: expected 'struct virtqueue *' but argument is of type 'void (**)(struct virtqueue *)'
    int virtqueue_add_outbuf(struct virtqueue *vq,
        ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/string.h:6:0,
                    from include/linux/scatterlist.h:5,
                    from include/linux/virtio.h:7,
                    from drivers//virtio/virtio_balloon.c:22:
   drivers//virtio/virtio_balloon.c:496:32: error: 'struct virtio_balloon' has no member named 'stats_vq'; did you mean 'stats'?
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
                                   ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers//virtio/virtio_balloon.c:496:3: note: in expansion of macro 'if'
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
      ^~
   drivers//virtio/virtio_balloon.c:496:28: error: passing argument 1 of 'virtqueue_add_outbuf' from incompatible pointer type [-Werror=incompatible-pointer-types]
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
                               ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers//virtio/virtio_balloon.c:496:3: note: in expansion of macro 'if'
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
      ^~
   In file included from drivers//virtio/virtio_balloon.c:22:0:
   include/linux/virtio.h:38:5: note: expected 'struct virtqueue *' but argument is of type 'void (**)(struct virtqueue *)'
    int virtqueue_add_outbuf(struct virtqueue *vq,
        ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/string.h:6:0,
                    from include/linux/scatterlist.h:5,
                    from include/linux/virtio.h:7,
                    from drivers//virtio/virtio_balloon.c:22:
   drivers//virtio/virtio_balloon.c:496:32: error: 'struct virtio_balloon' has no member named 'stats_vq'; did you mean 'stats'?
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
                                   ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers//virtio/virtio_balloon.c:496:3: note: in expansion of macro 'if'
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
      ^~
   drivers//virtio/virtio_balloon.c:496:28: error: passing argument 1 of 'virtqueue_add_outbuf' from incompatible pointer type [-Werror=incompatible-pointer-types]
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
                               ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers//virtio/virtio_balloon.c:496:3: note: in expansion of macro 'if'
      if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
      ^~
   In file included from drivers//virtio/virtio_balloon.c:22:0:
   include/linux/virtio.h:38:5: note: expected 'struct virtqueue *' but argument is of type 'void (**)(struct virtqueue *)'
    int virtqueue_add_outbuf(struct virtqueue *vq,
        ^~~~~~~~~~~~~~~~~~~~
   drivers//virtio/virtio_balloon.c:499:22: error: 'struct virtio_balloon' has no member named 'stats_vq'; did you mean 'stats'?
      virtqueue_kick(vb->stats_vq);
                         ^~~~~~~~
                         stats
   drivers//virtio/virtio_balloon.c:499:18: error: passing argument 1 of 'virtqueue_kick' from incompatible pointer type [-Werror=incompatible-pointer-types]
      virtqueue_kick(vb->stats_vq);
                     ^~
   In file included from drivers//virtio/virtio_balloon.c:22:0:
   include/linux/virtio.h:80:6: note: expected 'struct virtqueue *' but argument is of type 'void (**)(struct virtqueue *)'
    bool virtqueue_kick(struct virtqueue *vq);
         ^~~~~~~~~~~~~~
   drivers//virtio/virtio_balloon.c: In function 'virtballoon_probe':
   drivers//virtio/virtio_balloon.c:646:32: error: 'virtballoon_page_hinting' undeclared (first use in this function); did you mean 'virtballoon_oom_notify'?
      request_hypercall = (void *)&virtballoon_page_hinting;
                                   ^~~~~~~~~~~~~~~~~~~~~~~~
                                   virtballoon_oom_notify
   In file included from include/linux/string.h:6:0,
                    from include/linux/scatterlist.h:5,
                    from include/linux/virtio.h:7,
                    from drivers//virtio/virtio_balloon.c:22:
   drivers//virtio/virtio_balloon.c: At top level:
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:422:2: note: in expansion of macro 'if'
     if (p_size == (size_t)-1 && q_size == (size_t)-1)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:412:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:410:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:401:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:399:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:390:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:388:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:380:2: note: in expansion of macro 'if'
     if (p_size < size || q_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static

vim +/if +496 drivers//virtio/virtio_balloon.c

6b35e4076 Rusty Russell      2008-02-04  449  
be91c33dd Amit Shah          2011-12-22  450  static int init_vqs(struct virtio_balloon *vb)
6b35e4076 Rusty Russell      2008-02-04  451  {
1006af9c7 Nitesh Narayan Lal 2017-11-28  452  	struct virtqueue *vqs[4];
1006af9c7 Nitesh Narayan Lal 2017-11-28  453  	vq_callback_t *callbacks[] = { balloon_ack, balloon_ack, stats_request,
1006af9c7 Nitesh Narayan Lal 2017-11-28  454  				       hinting_ack };
1006af9c7 Nitesh Narayan Lal 2017-11-28  455  	static const char * const names[] = { "inflate", "deflate", "stats",
1006af9c7 Nitesh Narayan Lal 2017-11-28  456  					      "hinting" };
9564e138b Adam Litke         2009-11-30  457  	int err, nvqs;
1006af9c7 Nitesh Narayan Lal 2017-11-28  458  	bool stats_vq_support, page_hinting_support;
6b35e4076 Rusty Russell      2008-02-04  459  
be91c33dd Amit Shah          2011-12-22  460  	/*
be91c33dd Amit Shah          2011-12-22  461  	 * We expect two virtqueues: inflate and deflate, and
1006af9c7 Nitesh Narayan Lal 2017-11-28  462  	 * optionally stat and hinting.
be91c33dd Amit Shah          2011-12-22  463  	 */
1006af9c7 Nitesh Narayan Lal 2017-11-28  464  	stats_vq_support = virtio_has_feature(vb->vdev,
1006af9c7 Nitesh Narayan Lal 2017-11-28  465  					      VIRTIO_BALLOON_F_STATS_VQ);
1006af9c7 Nitesh Narayan Lal 2017-11-28  466  	page_hinting_support = virtio_has_feature(vb->vdev,
1006af9c7 Nitesh Narayan Lal 2017-11-28  467  						  VIRTIO_GUEST_PAGE_HINTING_VQ
1006af9c7 Nitesh Narayan Lal 2017-11-28  468  						  );
1006af9c7 Nitesh Narayan Lal 2017-11-28  469  	if (stats_vq_support && page_hinting_support)
1006af9c7 Nitesh Narayan Lal 2017-11-28  470  		nvqs = 4;
1006af9c7 Nitesh Narayan Lal 2017-11-28  471  	else if (stats_vq_support || page_hinting_support)
1006af9c7 Nitesh Narayan Lal 2017-11-28  472  		nvqs = 3;
1006af9c7 Nitesh Narayan Lal 2017-11-28  473  	else
1006af9c7 Nitesh Narayan Lal 2017-11-28  474  		nvqs = 2;
1006af9c7 Nitesh Narayan Lal 2017-11-28  475  
9b2bbdb22 Michael S. Tsirkin 2017-03-06  476  	err = virtio_find_vqs(vb->vdev, nvqs, vqs, callbacks, names, NULL);
d2a7ddda9 Michael S. Tsirkin 2009-06-12  477  	if (err)
be91c33dd Amit Shah          2011-12-22  478  		return err;
6b35e4076 Rusty Russell      2008-02-04  479  
d2a7ddda9 Michael S. Tsirkin 2009-06-12  480  	vb->inflate_vq = vqs[0];
d2a7ddda9 Michael S. Tsirkin 2009-06-12  481  	vb->deflate_vq = vqs[1];
1006af9c7 Nitesh Narayan Lal 2017-11-28  482  	if (page_hinting_support)
1006af9c7 Nitesh Narayan Lal 2017-11-28  483  		vb->hinting_vq = vqs[3];
9564e138b Adam Litke         2009-11-30  484  	if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {
9564e138b Adam Litke         2009-11-30  485  		struct scatterlist sg;
9646b26e8 Ladi Prosek        2017-03-28  486  		unsigned int num_stats;
9564e138b Adam Litke         2009-11-30  487  		vb->stats_vq = vqs[2];
9564e138b Adam Litke         2009-11-30  488  
9564e138b Adam Litke         2009-11-30  489  		/*
9564e138b Adam Litke         2009-11-30  490  		 * Prime this virtqueue with one buffer so the hypervisor can
4951cc908 Rusty Russell      2014-03-13  491  		 * use it to signal us later (it can't be broken yet!).
9564e138b Adam Litke         2009-11-30  492  		 */
9646b26e8 Ladi Prosek        2017-03-28  493  		num_stats = update_balloon_stats(vb);
fc8653228 Ladi Prosek        2017-03-23  494  
9646b26e8 Ladi Prosek        2017-03-28  495  		sg_init_one(&sg, vb->stats, sizeof(vb->stats[0]) * num_stats);
92549abc6 Rusty Russell      2013-03-20 @496  		if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
f96fde41f Rusty Russell      2012-01-12  497  		    < 0)
9564e138b Adam Litke         2009-11-30  498  			BUG();
946cfe0e0 Michael S. Tsirkin 2010-04-12  499  		virtqueue_kick(vb->stats_vq);
9564e138b Adam Litke         2009-11-30  500  	}
be91c33dd Amit Shah          2011-12-22  501  	return 0;
be91c33dd Amit Shah          2011-12-22  502  }
be91c33dd Amit Shah          2011-12-22  503  

:::::: The code at line 496 was first introduced by commit
:::::: 92549abc6a6573294fc1bb9330db8b52dedfea5f virtio_balloon: use simplified virtqueue accessors.

:::::: TO: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
:::::: CC: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux