summaryrefslogtreecommitdiffstats
path: root/core/modules/qemu
diff options
context:
space:
mode:
authorSimon Rettberg2021-12-10 11:57:49 +0100
committerSimon Rettberg2021-12-10 11:57:49 +0100
commitc060ae8f54d746e9ca0dee1acd1f59cd28ee25c2 (patch)
tree4633a7d23482b3dfd9dc2cc4e1a885272115ee39 /core/modules/qemu
parent[docker-ce] New module (target: stage4) (diff)
downloadmltk-c060ae8f54d746e9ca0dee1acd1f59cd28ee25c2.tar.gz
mltk-c060ae8f54d746e9ca0dee1acd1f59cd28ee25c2.tar.xz
mltk-c060ae8f54d746e9ca0dee1acd1f59cd28ee25c2.zip
[qemu] On kernel 5.15+, vfio-mdev is intergrated into mdev
Diffstat (limited to 'core/modules/qemu')
-rwxr-xr-xcore/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env b/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env
index 85182d47..6463ce9c 100755
--- a/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env
+++ b/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env
@@ -47,8 +47,10 @@ if passthrough_mdev_enabled; then
fi
# load required kernel modules for mediated device passthrough
- modprobe "vfio-mdev" || { slxlog --echo "qemu" "Could not load 'vfio-mdev' kernel modul!"; exit 3; }
- modprobe "kvmgt" || { slxlog --echo "qemu" "Could not load 'kvmgt' kernel modul!"; exit 4; }
+ modprobe "vfio-mdev" 2> /dev/null \
+ || modprobe "mdev" \
+ || { slxlog --echo "qemu" "Could not load vfio mdev kernel module!"; exit 3; }
+ modprobe "kvmgt" || { slxlog --echo "qemu" "Could not load 'kvmgt' kernel module!"; exit 4; }
# get Intel integrated GPU mediated device for passthrough
pt_mdev_device="$(passthrough_mdev_device_get_intel_igd)"