To inspire you, I’ve got a video from someone else. Better mutt the volume by the way.
Arch Linux KVM Crysis HD Gpu Passthrough
Or you can download it to see.
Download the video in HD

Here’s the links I refer to:
http://thread.gmane.org/gmane.comp.emulators.kvm.devel/71981
https://bbs.archlinux.org/viewtopic.php?id=162768
https://docs.google.com/document/d/1ef_nfl652L0HLn_wGvnpgjsBJd9LZzaV_-rIcEEoK8Y/edit?pli=1
http://www.linux-kvm.org/page/VGA_device_assignment
http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM

Result:
VGAPassthrough: success in host F19, guest Windows7
GPUPassthrough: success in Fedora-Rawhide

HOST:
CPU: Core i5 3470
GPU: ATI HD Radeon 7850
OS: Fedora-Rawhide
QEMU: qemu-1.5.1
GPU Passthrough, VGA Passthrough in KVM
So, here’s the steps

0. Enable the mainboard VxT, iommu and alter the video device to Intel HD

1. See what we have got now.

We have output below

You can see the pci bus and vendor.

2. Modify the kernel parameter, morprobe.d and libvirt.conf

Add follow parameters to grub.conf

NOTE: If you have got an AMD cpu, please replace “interl_iommu=on” with “iommu=pt iommu=1”
Add modprobe.conf to /etc/modprobe.d/ with this content:

change the following options in /etc/libvirt/qemu.conf:

Reboot.

3. Using scripts below

Version 1: VFIO-Passthrough

File: vfio-bind

Bind the device

Start VM

Version 2: PCI-Passthrough

Bind device

Start VM

Category: Linux Admin Virtualization

相关文章: