​Requirements​
​Update tool​
​Guide​
​Kernel Compiling​
​GRUB​
​mdev​
​libvirt​
​QEMU​
​Openstack​
​https://01.org/igvt-g/blogs/wangbo85/2017/intel-gvt-g-kvmgt-public-release-q22017 Xeon E3_v4+ / Core Gen 5th(Broadwell)+​
lspci -v -s 00:02.0
​https://download.01.org/gfx/repos/src/ https://01.org/linuxgraphics/downloads/intel-graphics-update-tool-linux-os-v2.0.5​
wget https://download.01.org/gfx/RPM-GPG-GROUP-KEY-ilgsudo apt-key add RPM-GPG-GROUP-KEY-ilg​apt install -y libgtk-3-0apt --fix-broken install
​https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide https://www.kraxel.org/blog/2017/01/virtual-gpu-support-landing-upstream/​
CONFIG_DRM_I915_GVTCONFIG_DRM_I915_GVT_KVMGT # KVMGTCONFIG_DRM_I915_GVT_XENGT # XENGTCONFIG_VFIO_MDEVCONFIG_VFIO_MDEV_DEVICECONFIG_VFIO_IOMMU_TYPE1​cat .config | grep -P 'I915|VFIO|KVM'lsmod | grep -P -i 'vfio|kvm|i915'
​https://download.01.org/GVT-g/​
For KVMGT, you also can use the current upstream Linux kernel and QEMU directly since all the enabling patches have been upstreamed. https://github.com/intel/gvt-linux/tree/gvt-staging/drivers/gpu/drm/i915/gvt​
https://github.com/intel/gvt-linux/releases (~150MB)git clone -b gvt-stable-4.12 https://github.com/intel/gvt-linux.git # >20G?echo ""|make oldconfig
For XenGT, you must use the repositories we provided. https://github.com/intel/Igvtg-xen/tree/xengt-stable-4.9/​
​https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide#332-build-qemu--xen-for-xengt​
git clone -b xengt-stable-4.9 https://github.com/01org/igvtg-xen # ~111MB
vi /etc/default/grub # KVMGTi915.hvm_boot_foreground=1 i915.enable_gvt=1 kvm.ignore_msrs=1 intel_iommu=igfx_off drm.debug=0
ls /sys/bus/pci/devices/0000\:00\:02.0/mdev_supported_types/V4 means it is "Broadwell" platform,V5 means it is "Skylake" or "Kabylake" platform​vgpu_create="/sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_4/create"echo "a297db4a-f4c2-11e6-90f6-d3b88d6c9525" > $vgpu_createls /sys/bus/pci/devices/0000:00:02.0/​/sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_4/descriptionlow_gm_size: 128MBhigh_gm_size: 512MBfence: 4resolution: 1920x1200weight: 4​/sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_8/descriptionlow_gm_size: 64MBhigh_gm_size: 384MBfence: 4resolution: 1024x768weight: 2
<os><loader readonly='yes' secure='no' type='rom'>/usr/bin/bios.bin</loader>​<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'><qemu:commandline><qemu:arg value='-device'/><qemu:arg value='vfio-pci,addr=05.0,sysfsdev=/sys/class/mdev_bus/0000:00:02.0/673475f6-cd28-11e7-9d1e-773e86af553a'/></qemu:commandline>​https://mpolednik.github.io/2017/05/21/vfio-mdev/Since 3.2.0<devices><hostdev mode='subsystem' type='mdev' model='vfio-pci'><source><address uuid='673475f6-cd28-11e7-9d1e-773e86af553a'/></source></hostdev>​https://libvirt.org/drvnodedev.html#MDEV (Since 3.4.0)​# workaround "error: cannot load AppArmor profile"/etc/libvirtd/qemu.confsecurity_driver = "none"​# workaround 'error opening /dev/vfio/#: Permission denied'sudo aa-complain /usr/sbin/libvirtdsudo aa-complain /etc/apparmor.d/libvirt/libvirt-*
git clone -b stable-2.9.0 https://github.com/intel/Igvtg-qemu.git # ~184MBapt-get install -y libsdl2-dev libpixman-1-dev libspice-server-devqemu-system-x86_64 --version
​https://www.openstack.org/assets/presentation-media/Enable-GPU-virtualization-in-OpenStack.pdf​