From c060ae8f54d746e9ca0dee1acd1f59cd28ee25c2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 10 Dec 2021 11:57:49 +0100 Subject: [qemu] On kernel 5.15+, vfio-mdev is intergrated into mdev --- core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/modules/qemu') 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)" -- cgit v1.2.3-55-g7522