diff mbox series

[kvmtool,2/4] util: include virtio UAPI headers in sync

Message ID 20220524150611.523910-3-andre.przywara@arm.com (mailing list archive)
State New, archived
Headers show
Series Update virtio headers (to fix build) | expand

Commit Message

Andre Przywara May 24, 2022, 3:06 p.m. UTC
We already have an update_headers.sh sync script, where we occasionally
update the KVM interface UAPI kernel headers into our tree.
So far this covered only the generic kvm.h, plus each architecture's
version of that file.
Commit  bc77bf49df6e ("stat: Add descriptions for new virtio_balloon
stat types") used newer virtio symbols, which some older distros do not
include in their kernel headers package. To help fixing this and to
avoid similar problems in the future, add the virtio headers to our sync
script, so that we can get the same, up-to-date versions of the headers
easily.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 util/update_headers.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/util/update_headers.sh b/util/update_headers.sh
index 5f9cd32d..789e2a42 100755
--- a/util/update_headers.sh
+++ b/util/update_headers.sh
@@ -9,6 +9,11 @@ 
 
 set -ue
 
+VIRTIO_LIST="virtio_9p.h virtio_balloon.h virtio_blk.h virtio_config.h \
+	     virtio_console.h virtio_ids.h virtio_mmio.h virtio_net.h \
+	     virtio_pci.h virtio_ring.h virtio_rng.h virtio_scsi.h \
+	     virtio_vsock.h"
+
 if [ "$#" -ge 1 ]
 then
 	LINUX_ROOT="$1"
@@ -25,6 +30,11 @@  fi
 
 cp -- "$LINUX_ROOT/include/uapi/linux/kvm.h" include/linux
 
+for header in $VIRTIO_LIST
+do
+	cp -- "$LINUX_ROOT/include/uapi/linux/$header" include/linux
+done
+
 unset KVMTOOL_PATH
 
 copy_optional_arch () {