feat: vm-native setup, verify and gpu tooling with acpi and bench
This commit is contained in:
19
scripts/restore-stock-kvm.sh
Executable file
19
scripts/restore-stock-kvm.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Roll back to stock KVM: remove the patched modules and load the in-tree ones.
|
||||
# The counterpart to install-modules.sh. Safe to run at any time.
|
||||
#
|
||||
# If the host hard-locked and you force-rebooted, run this before starting any VM.
|
||||
set -euo pipefail
|
||||
K=$(uname -r)
|
||||
# the DKMS package owns updates/dkms/; remove it through pacman so dkms cleans up every kernel
|
||||
if pacman -Q vfio-native-kvm-dkms >/dev/null 2>&1; then
|
||||
pacman -R --noconfirm vfio-native-kvm-dkms
|
||||
fi
|
||||
rm -f "/usr/lib/modules/$K/updates/kvm.ko.zst" \
|
||||
"/usr/lib/modules/$K/updates/kvm-amd.ko.zst" \
|
||||
"/usr/lib/modules/$K/updates/kvm-intel.ko.zst"
|
||||
depmod -a "$K"
|
||||
modprobe -r kvm_amd 2>/dev/null || true
|
||||
modprobe -r kvm 2>/dev/null || true
|
||||
modprobe kvm_amd
|
||||
echo "stock KVM restored: $(cat /sys/module/kvm/srcversion)"
|
||||
Reference in New Issue
Block a user