From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 1/2] virtio: stop using legacy struct vring in kernel
Date: Tue, 07 Apr 2020 06:11:18 +0800 [thread overview]
Message-ID: <202004070648.TarYcahQ%lkp@intel.com> (raw)
In-Reply-To: <20200406161146.130741-2-mst@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 7106 bytes --]
Hi "Michael,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200406]
[also build test ERROR on v5.6]
[cannot apply to vhost/linux-next linus/master linux/master v5.6 v5.6-rc7 v5.6-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Michael-S-Tsirkin/virtio-alignment-issues/20200407-025651
base: b2e2a818a01717ba15c74fd355f76822b81a95f6
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/virtio.h:12,
from drivers/virtio/virtio_ring.c:6:
include/linux/vringh.h:42:15: error: field 'vring' has incomplete type
42 | struct vring vring;
| ^~~~~
drivers/virtio/virtio_ring.c: In function 'vring_create_virtqueue_split':
>> drivers/virtio/virtio_ring.c:870:16: error: implicit declaration of function 'vring_size' [-Werror=implicit-function-declaration]
870 | for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
| ^~~~~~~~~~
>> drivers/virtio/virtio_ring.c:892:2: error: implicit declaration of function 'vring_init'; did you mean 'paging_init'? [-Werror=implicit-function-declaration]
892 | vring_init(&vring, num, queue, vring_align);
| ^~~~~~~~~~
| paging_init
cc1: some warnings being treated as errors
vim +/vring_size +870 drivers/virtio/virtio_ring.c
138fd25148638a Tiwei Bie 2018-11-21 844
d79dca75c79680 Tiwei Bie 2018-11-21 845 static struct virtqueue *vring_create_virtqueue_split(
d79dca75c79680 Tiwei Bie 2018-11-21 846 unsigned int index,
d79dca75c79680 Tiwei Bie 2018-11-21 847 unsigned int num,
d79dca75c79680 Tiwei Bie 2018-11-21 848 unsigned int vring_align,
d79dca75c79680 Tiwei Bie 2018-11-21 849 struct virtio_device *vdev,
d79dca75c79680 Tiwei Bie 2018-11-21 850 bool weak_barriers,
d79dca75c79680 Tiwei Bie 2018-11-21 851 bool may_reduce_num,
d79dca75c79680 Tiwei Bie 2018-11-21 852 bool context,
d79dca75c79680 Tiwei Bie 2018-11-21 853 bool (*notify)(struct virtqueue *),
d79dca75c79680 Tiwei Bie 2018-11-21 854 void (*callback)(struct virtqueue *),
d79dca75c79680 Tiwei Bie 2018-11-21 855 const char *name)
d79dca75c79680 Tiwei Bie 2018-11-21 856 {
d79dca75c79680 Tiwei Bie 2018-11-21 857 struct virtqueue *vq;
d79dca75c79680 Tiwei Bie 2018-11-21 858 void *queue = NULL;
d79dca75c79680 Tiwei Bie 2018-11-21 859 dma_addr_t dma_addr;
d79dca75c79680 Tiwei Bie 2018-11-21 860 size_t queue_size_in_bytes;
d79dca75c79680 Tiwei Bie 2018-11-21 861 struct vring vring;
d79dca75c79680 Tiwei Bie 2018-11-21 862
d79dca75c79680 Tiwei Bie 2018-11-21 863 /* We assume num is a power of 2. */
d79dca75c79680 Tiwei Bie 2018-11-21 864 if (num & (num - 1)) {
d79dca75c79680 Tiwei Bie 2018-11-21 865 dev_warn(&vdev->dev, "Bad virtqueue length %u\n", num);
d79dca75c79680 Tiwei Bie 2018-11-21 866 return NULL;
d79dca75c79680 Tiwei Bie 2018-11-21 867 }
d79dca75c79680 Tiwei Bie 2018-11-21 868
d79dca75c79680 Tiwei Bie 2018-11-21 869 /* TODO: allocate each queue chunk individually */
d79dca75c79680 Tiwei Bie 2018-11-21 @870 for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
d79dca75c79680 Tiwei Bie 2018-11-21 871 queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
d79dca75c79680 Tiwei Bie 2018-11-21 872 &dma_addr,
d79dca75c79680 Tiwei Bie 2018-11-21 873 GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);
d79dca75c79680 Tiwei Bie 2018-11-21 874 if (queue)
d79dca75c79680 Tiwei Bie 2018-11-21 875 break;
cf94db21905333 Cornelia Huck 2019-04-08 876 if (!may_reduce_num)
cf94db21905333 Cornelia Huck 2019-04-08 877 return NULL;
d79dca75c79680 Tiwei Bie 2018-11-21 878 }
d79dca75c79680 Tiwei Bie 2018-11-21 879
d79dca75c79680 Tiwei Bie 2018-11-21 880 if (!num)
d79dca75c79680 Tiwei Bie 2018-11-21 881 return NULL;
d79dca75c79680 Tiwei Bie 2018-11-21 882
d79dca75c79680 Tiwei Bie 2018-11-21 883 if (!queue) {
d79dca75c79680 Tiwei Bie 2018-11-21 884 /* Try to get a single page. You are my only hope! */
d79dca75c79680 Tiwei Bie 2018-11-21 885 queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
d79dca75c79680 Tiwei Bie 2018-11-21 886 &dma_addr, GFP_KERNEL|__GFP_ZERO);
d79dca75c79680 Tiwei Bie 2018-11-21 887 }
d79dca75c79680 Tiwei Bie 2018-11-21 888 if (!queue)
d79dca75c79680 Tiwei Bie 2018-11-21 889 return NULL;
d79dca75c79680 Tiwei Bie 2018-11-21 890
d79dca75c79680 Tiwei Bie 2018-11-21 891 queue_size_in_bytes = vring_size(num, vring_align);
d79dca75c79680 Tiwei Bie 2018-11-21 @892 vring_init(&vring, num, queue, vring_align);
d79dca75c79680 Tiwei Bie 2018-11-21 893
d79dca75c79680 Tiwei Bie 2018-11-21 894 vq = __vring_new_virtqueue(index, vring, vdev, weak_barriers, context,
d79dca75c79680 Tiwei Bie 2018-11-21 895 notify, callback, name);
d79dca75c79680 Tiwei Bie 2018-11-21 896 if (!vq) {
d79dca75c79680 Tiwei Bie 2018-11-21 897 vring_free_queue(vdev, queue_size_in_bytes, queue,
d79dca75c79680 Tiwei Bie 2018-11-21 898 dma_addr);
d79dca75c79680 Tiwei Bie 2018-11-21 899 return NULL;
d79dca75c79680 Tiwei Bie 2018-11-21 900 }
d79dca75c79680 Tiwei Bie 2018-11-21 901
d79dca75c79680 Tiwei Bie 2018-11-21 902 to_vvq(vq)->split.queue_dma_addr = dma_addr;
d79dca75c79680 Tiwei Bie 2018-11-21 903 to_vvq(vq)->split.queue_size_in_bytes = queue_size_in_bytes;
d79dca75c79680 Tiwei Bie 2018-11-21 904 to_vvq(vq)->we_own_ring = true;
d79dca75c79680 Tiwei Bie 2018-11-21 905
d79dca75c79680 Tiwei Bie 2018-11-21 906 return vq;
d79dca75c79680 Tiwei Bie 2018-11-21 907 }
d79dca75c79680 Tiwei Bie 2018-11-21 908
:::::: The code at line 870 was first introduced by commit
:::::: d79dca75c79680f52a27a7ee1b6ae75066f36b3e virtio_ring: extract split ring handling from ring creation
:::::: TO: Tiwei Bie <tiwei.bie@intel.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26179 bytes --]
next prev parent reply other threads:[~2020-04-06 22:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 16:11 [PATCH v3 0/2] virtio: alignment issues Michael S. Tsirkin
2020-04-06 16:11 ` [PATCH v3 1/2] virtio: stop using legacy struct vring in kernel Michael S. Tsirkin
2020-04-06 20:54 ` kbuild test robot
2020-04-06 20:54 ` kbuild test robot
2020-04-06 22:11 ` kbuild test robot [this message]
2020-04-08 0:13 ` kbuild test robot
2020-04-06 16:12 ` [PATCH v3 2/2] vhost: force spec specified alignment on types Michael S. Tsirkin
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=202004070648.TarYcahQ%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.