#!/bin/bash

# 获取VFIO相关错误日志
ERROR_LOGS=$(dmesg | grep -i "vfio_iommu_type1_attach_group: No interrupt remapping support")

# 分析错误类型
if [ -n "$ERROR_LOGS" ]; then
	echo $ERROR_LOGS
	echo "vfio option error, do: echo \"options vfio_iommu_type1 allow_unsafe_interrupts=1\" >/etc/modprobe.d/vfio.conf, and restart vfio module"
else
	echo "no find errors"
fi
