Skip to content

Commit 39cfe19

Browse files
committed
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>
1 parent e88dfb9 commit 39cfe19

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

tools/virtio/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ OOT_CONFIGS=\
3838
CONFIG_VHOST_NET=n \
3939
CONFIG_VHOST_SCSI=n \
4040
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}
4344
oot-build:
4445
echo "UNSUPPORTED! Don't use the resulting modules in production!"
4546
${OOT_BUILD} M=`pwd`/vhost_test

tools/virtio/oot-stubs.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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

0 commit comments

Comments
 (0)