Skip to content

Instantly share code, notes, and snippets.

@hmrhkr
Created May 20, 2020 10:31
Show Gist options
  • Save hmrhkr/e384016886e3151236bbe2e46378ecb3 to your computer and use it in GitHub Desktop.
Save hmrhkr/e384016886e3151236bbe2e46378ecb3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
export VGA_DEVICE=0000:0b:00.0
echo "unbinding, resetting and rebinding $VGA_DEVICE" > /dev/kmsg 2>&1
echo $VGA_DEVICE > /sys/bus/pci/devices/$VGA_DEVICE/driver/unbind
/root/reset-test $VGA_DEVICE
echo $VGA_DEVICE > /sys/bus/pci/drivers/vfio-pci/bind
echo "sucessfully unbound, reset and rebound $VGA_DEVICE" > /dev/kmsg 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment