]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools/virtio: fix up oot build
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 4 Dec 2025 17:55:11 +0000 (12:55 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 24 Dec 2025 13:02:56 +0000 (08:02 -0500)
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>
tools/virtio/Makefile
tools/virtio/oot-stubs.h [new file with mode: 0644]

index a60316211df6b982f52466832ddc2a8e4aab403a..2cac5fd4b97944dd6ef3cb42756210bb7137f057 100644 (file)
@@ -38,8 +38,9 @@ OOT_CONFIGS=\
        CONFIG_VHOST_NET=n \
        CONFIG_VHOST_SCSI=n \
        CONFIG_VHOST_VSOCK=n \
-       CONFIG_VHOST_RING=n
-OOT_BUILD=KCFLAGS="-I "${OOT_VHOST} ${MAKE} -C ${OOT_KSRC} V=${V}
+       CONFIG_VHOST_RING=n \
+       CONFIG_VHOST_VDPA=n
+OOT_BUILD=KCFLAGS="-include "`pwd`"/oot-stubs.h -I "${OOT_VHOST} ${MAKE} -C ${OOT_KSRC} V=${V}
 oot-build:
        echo "UNSUPPORTED! Don't use the resulting modules in production!"
        ${OOT_BUILD} M=`pwd`/vhost_test
diff --git a/tools/virtio/oot-stubs.h b/tools/virtio/oot-stubs.h
new file mode 100644 (file)
index 0000000..69e059c
--- /dev/null
@@ -0,0 +1,10 @@
+#include <linux/bug.h>
+#include <linux/string.h>
+#include <linux/virtio_features.h>
+
+#ifndef VIRTIO_FEATURES_BITS
+#define VIRTIO_FEATURES_BITS 128
+#endif
+#ifndef VIRTIO_U64
+#define VIRTIO_U64(b)           ((b) >> 6)
+#endif