INCLUDES="$INCLUDES_arch ${INCLUDES-}" \
"$mydir"/ioctls_sym.sh "$inc_dir" > ioctls_sym.h
+# Move KVM_* constants from ioctls_inc.h to ioctls_arch.h.
+grep -F 'linux/kvm.h' < ioctls_sym.h > ioctls_kvm.h ||:
+grep -Fv 'linux/kvm.h' < ioctls_sym.h > ioctls_unkvm.h
+mv ioctls_unkvm.h ioctls_sym.h
+
# Part of android ioctl commands are defined elsewhere.
android_dir="$inc_dir/../drivers/staging/android"
if [ -d "$android_dir/uapi" ]; then
# Output all ioctl definitions fetched from arch-include-directory.
echo "/* Generated by $me from definitions found in ${arch_dir%%/}/ tree. */" > ioctls_arch.h
-LC_COLLATE=C sort -u ioctls_hex.h ioctls_sym.h >> ioctls_arch.h
+LC_COLLATE=C sort -u ioctls_hex.h ioctls_kvm.h ioctls_sym.h >> ioctls_arch.h
msg "generated $(grep -c '^{' ioctls_arch.h) ioctls from $arch_dir"