From 5008b013dbc1368677026e864b613fce2d947c71 Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Sat, 21 Mar 2020 08:51:37 +0000
Subject: [PATCH] Create VGPU with GVT-g for vm

---
 win_igpu.sh |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/win_igpu.sh b/win_igpu.sh
new file mode 100755
index 0000000..09a2e74
--- /dev/null
+++ b/win_igpu.sh
@@ -0,0 +1,17 @@
+if [ $EUID != 0 ]; then
+	sudo "$0" "$@"
+	exit $?
+fi
+
+case $1 in
+	start)
+		echo "fd798828-3180-4c19-a634-b88ddea27abe" > "/sys/devices/pci0000:00/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_4/create"
+		;;
+	stop)
+		echo 1 > "/sys/devices/pci0000:00/0000:00:02.0/fd798828-3180-4c19-a634-b88ddea27abe/remove"
+		;;
+	*)
+		echo "Usage $0 start|stop"
+		;;
+esac
+

--
Gitblit v1.9.3