Re: linux-next: build failure after merge of the vhost tree

From: Michael S. Tsirkin
Date: Tue Apr 07 2020 - 06:01:33 EST


On Tue, Apr 07, 2020 at 01:05:42PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the vhost tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/gpu/drm/virtio/virtgpu_kms.c: In function 'virtio_gpu_init':
> drivers/gpu/drm/virtio/virtgpu_kms.c:153:38: error: 'VIRTIO_RING_F_INDIRECT_DESC' undeclared (first use in this function)
> 153 | if (virtio_has_feature(vgdev->vdev, VIRTIO_RING_F_INDIRECT_DESC)) {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/virtio/virtgpu_kms.c:153:38: note: each undeclared identifier is reported only once for each function it appears in
>
> Caused by commit
>
> 898952f9597e ("virtio: stop using legacy struct vring in kernel")
>
> interacting with commit
>
> 5edbb5608256 ("drm/virtio: fix ring free check")
>
> from Linus' tree (post v5.6).
>
> I have added the following merge fix patch for today.
>
> From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> Date: Tue, 7 Apr 2020 12:58:26 +1000
> Subject: [PATCH] drm/virtio: fix up for include file changes
>
> Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>

That's the right fix - anyone using VIRTIO_RING_F_INDIRECT_DESC
must include virtio_ring.h, not assume some other header
pulls it in.

Given Gerd's patch is in Linus' tree I'll put this one in mine to
make things easy.

Thanks!

> ---
> drivers/gpu/drm/virtio/virtgpu_kms.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c
> index 023a030ca7b9..f4ea4cef5e23 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_kms.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c
> @@ -25,6 +25,7 @@
>
> #include <linux/virtio.h>
> #include <linux/virtio_config.h>
> +#include <linux/virtio_ring.h>
>
> #include <drm/drm_file.h>
>
> --
> 2.25.0
>
> I do have to wonder why all this code has been added to the vhost tree
> during the second week of the merge window (especially when I see it
> rebased 4 times in one day :-(). Is it really intended for v5.7?
> --
> Cheers,
> Stephen Rothwell