How can we do pci pass-through or device assignment with kvm?

This is a very interesting feature which provides you the capability of passing a “PCI” device to a guest system bypassing the HOST .

Below Red Hat kbase gives you information about doing pci pass-through with XEN.

http://kbase.redhat.com/faq/docs/DOC-17364

With KVM , pci pass-through can be achieved by two ways.

* virt-manager
* Command line method.

PCI pass-through is a virtualization-related ability that is enabled by AMD’s IOMMU and Intel’s VT-d technologies.

Ref:

http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.4/html/Technical_Notes/libvirt.html

https://fedoraproject.org/wiki/Test_Day:2009-05-07_Virtualization_KVM_PCI_Device_Assignment

Virt-Manager :

Virt-manager with version ‘0.6.1’ or greater should support PCI passthrough by performing below steps:

* In VM Details click on the tab ” Hardware” , then click on “Add Hardware” .

* Now select ‘Hardware type’ as “Physical host device”.

* The next window will provide you with two drop-down boxes called “Device Type” and “Device”

* Select Device Type as “PCI device” .

* Now select the approprite pci device ( verify the pci information from #lspci command in the HOST system ) which you want to pass through as “Device”.

* Click on “Finish”.

Command Line :

Below is the upstream link which describes the command line steps to achieve the same.

http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM

thats it…