Add vfio stuff for win10
Add a whole bunch of stuff to start/stop displays for the win10 vm Hopefully this will allow win10 to directly use the same GPU in passthru mode
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{
|
||||
writeShellApplication,
|
||||
vfio_shutdown,
|
||||
vfio_startup,
|
||||
}:
|
||||
|
||||
writeShellApplication {
|
||||
name = "qemu_hook";
|
||||
runtimeInputs = [
|
||||
vfio_shutdown
|
||||
vfio_startup
|
||||
];
|
||||
|
||||
text = ''
|
||||
OBJECT="''${1}"
|
||||
OPERATION="''${2}"
|
||||
|
||||
if [[ "''${OBJECT}" == "win10" ]]; then
|
||||
case "''${OPERATION}" in
|
||||
"prepare")
|
||||
systemctl start libvirt-nosleep@"''${OBJECT}".service
|
||||
systemctl start bluetooth.service
|
||||
vfio_startup 2>&1 | tee -a /var/log/qemu_hook.log
|
||||
;;
|
||||
"release")
|
||||
systemctl stop libvirt-nosleep@"''${OBJECT}".service
|
||||
vfio_shutdown 2>&1 | tee -a /var/log/qemu_hook.log
|
||||
esac
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user