Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/virtio: fix up oot build

oot build tends to help uncover bugs so it's worth keeping around,
as long as it's low effort.
add stubs for a couple of macros virtio gained recently,
and disable vdpa in the test build.

Message-ID: <33968faa7994b86d1f78057358a50b8f460c7a23.1764873799.git.mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

+13 -2
+3 -2
tools/virtio/Makefile
··· 38 38 CONFIG_VHOST_NET=n \ 39 39 CONFIG_VHOST_SCSI=n \ 40 40 CONFIG_VHOST_VSOCK=n \ 41 - CONFIG_VHOST_RING=n 42 - OOT_BUILD=KCFLAGS="-I "${OOT_VHOST} ${MAKE} -C ${OOT_KSRC} V=${V} 41 + CONFIG_VHOST_RING=n \ 42 + CONFIG_VHOST_VDPA=n 43 + OOT_BUILD=KCFLAGS="-include "`pwd`"/oot-stubs.h -I "${OOT_VHOST} ${MAKE} -C ${OOT_KSRC} V=${V} 43 44 oot-build: 44 45 echo "UNSUPPORTED! Don't use the resulting modules in production!" 45 46 ${OOT_BUILD} M=`pwd`/vhost_test
+10
tools/virtio/oot-stubs.h
··· 1 + #include <linux/bug.h> 2 + #include <linux/string.h> 3 + #include <linux/virtio_features.h> 4 + 5 + #ifndef VIRTIO_FEATURES_BITS 6 + #define VIRTIO_FEATURES_BITS 128 7 + #endif 8 + #ifndef VIRTIO_U64 9 + #define VIRTIO_U64(b) ((b) >> 6) 10 + #endif