From 6e9c352ce5aea90156106a6717b4efab0c794d61 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 28 Oct 2024 10:56:20 +0100 Subject: [hardware-stats] Check that kernel has vfio.ko built-in This is a requirement for GPU passthrough with QEMU. --- .../data/opt/openslx/system-check/hooks.d/50-hardware-warnings | 3 +++ .../data/opt/openslx/system-check/lang/de/slx-vfio-not-builtin | 1 + .../data/opt/openslx/system-check/lang/en/slx-vfio-not-builtin | 1 + .../data/opt/openslx/system-check/tags/slx-vfio-not-builtin | 2 ++ 4 files changed, 7 insertions(+) create mode 100644 core/modules/hardware-stats/data/opt/openslx/system-check/lang/de/slx-vfio-not-builtin create mode 100644 core/modules/hardware-stats/data/opt/openslx/system-check/lang/en/slx-vfio-not-builtin create mode 100644 core/modules/hardware-stats/data/opt/openslx/system-check/tags/slx-vfio-not-builtin diff --git a/core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-warnings b/core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-warnings index 627b94fd..cd84199c 100755 --- a/core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-warnings +++ b/core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-warnings @@ -12,3 +12,6 @@ fi if lspci -nk | grep -q 'Kernel driver in use: nouveau'; then echo 'slx-gfx-nouveau' fi +if ! grep -Fq 'vfio.ko' "/lib/modules/$(uname -r)/modules.builtin"; then + echo 'slx-vfio-not-builtin' +fi diff --git a/core/modules/hardware-stats/data/opt/openslx/system-check/lang/de/slx-vfio-not-builtin b/core/modules/hardware-stats/data/opt/openslx/system-check/lang/de/slx-vfio-not-builtin new file mode 100644 index 00000000..4ab8a03d --- /dev/null +++ b/core/modules/hardware-stats/data/opt/openslx/system-check/lang/de/slx-vfio-not-builtin @@ -0,0 +1 @@ +* Der Kernel wurde ohne builtin VFIO-Modul gebaut. Wegschmeißen und neukaufen! diff --git a/core/modules/hardware-stats/data/opt/openslx/system-check/lang/en/slx-vfio-not-builtin b/core/modules/hardware-stats/data/opt/openslx/system-check/lang/en/slx-vfio-not-builtin new file mode 100644 index 00000000..65358ce4 --- /dev/null +++ b/core/modules/hardware-stats/data/opt/openslx/system-check/lang/en/slx-vfio-not-builtin @@ -0,0 +1 @@ +* This is a kernel without VFIO support built-in. Please throw away this version of bwLehrpool and buy a new one. diff --git a/core/modules/hardware-stats/data/opt/openslx/system-check/tags/slx-vfio-not-builtin b/core/modules/hardware-stats/data/opt/openslx/system-check/tags/slx-vfio-not-builtin new file mode 100644 index 00000000..c75eebfa --- /dev/null +++ b/core/modules/hardware-stats/data/opt/openslx/system-check/tags/slx-vfio-not-builtin @@ -0,0 +1,2 @@ +color=#ff0000 +contact= -- cgit v1.2.3-55-g7522