linux/tools/virtio
Yichong Chen 74a21a2db6 tools/virtio: add missing compat definitions for vhost_net_test
Patch series "tools: Fix tools/virtio test build", v2.

This series fixes build failures hit by:

  make -C tools/virtio test

Patch 1 adds tools/virtio compatibility definitions needed by current
virtio headers when building the tools/virtio tests.  Patch 2 makes
tools/include/linux/overflow.h include stdint.h for SIZE_MAX, which is
used by its size helper functions.

With the series applied, make -C tools/virtio test builds virtio_test,
vringh_test and vhost_net_test successfully.

Tested on x86_64 and arm64 with:

  make -C tools/virtio clean
  make -C tools/virtio test


This patch (of 2):

vhost_net_test builds virtio_ring.c in userspace.

Recent virtio headers pull in helper headers that are not provided by the
tools/virtio compatibility layer, including asm/percpu_types.h,
linux/completion.h, linux/mod_devicetable.h and linux/virtio_features.h.

Add the missing compat definitions and the DMA attribute used by the
current virtio ring code.

Link: https://lore.kernel.org/20260629022124.131894-1-chenyichong@uniontech.com
Link: https://lore.kernel.org/20260629022124.131894-2-chenyichong@uniontech.com
Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Cc: chenyichong <chenyichong@uniontech.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-07-01 19:02:56 -07:00
..
asm tools/virtio: add missing compat definitions for vhost_net_test 2026-07-01 19:02:56 -07:00
crypto tools/virtio: more stubs 2019-10-11 09:27:27 -04:00
generated virtio/test: fix up after IOTLB changes 2020-04-16 18:31:08 -04:00
linux tools/virtio: add missing compat definitions for vhost_net_test 2026-07-01 19:02:56 -07:00
ringtest tools/virtio:Fix the wrong format specifier 2024-09-10 02:51:48 -04:00
uapi/linux
vhost_test
virtio-trace tools/virtio: use canonical ftrace path 2023-06-09 12:08:08 -04:00
xen tools/virtio: xen stub 2019-10-13 09:38:27 -04:00
.gitignore tools: virtio: introduce vhost_net_test 2024-03-05 11:38:14 +01:00
Makefile tools/virtio: fix up oot build 2025-12-24 08:02:56 -05:00
oot-stubs.h tools/virtio: fix up oot build 2025-12-24 08:02:56 -05:00
vhost_net_test.c tools: virtio: introduce vhost_net_test 2024-03-05 11:38:14 +01:00
virtio_test.c tools/virtio: virtio_test -h,--help should return directly 2023-04-21 03:02:30 -04:00
vringh_test.c tools/virtio: check mmap return value in vringh_test 2026-06-10 02:16:59 -04:00