<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://linux-kvm.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Luke-Jr</id>
	<title>KVM - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://linux-kvm.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Luke-Jr"/>
	<link rel="alternate" type="text/html" href="https://linux-kvm.org/page/Special:Contributions/Luke-Jr"/>
	<updated>2026-04-21T15:34:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://linux-kvm.org/index.php?title=How_to_assign_devices_with_VT-d_in_KVM&amp;diff=3587</id>
		<title>How to assign devices with VT-d in KVM</title>
		<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=How_to_assign_devices_with_VT-d_in_KVM&amp;diff=3587"/>
		<updated>2011-05-27T02:03:47Z</updated>

		<summary type="html">&lt;p&gt;Luke-Jr: Graphics card passthrough success&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to assign devices with VT-d in KVM =&lt;br /&gt;
&lt;br /&gt;
== VT-d support ==&lt;br /&gt;
* In order to assign devices in KVM, you&#039;ll need a system which supports VT-d. This has nothing to do with the VT-x support of your CPU, VT-d needs to be supported by both your chipset on your motherboard and by your CPU.&lt;br /&gt;
&lt;br /&gt;
* If you are in doubt whether your motherboard or CPU supports VT-d or not, the Xen VT-d wikipage has some pointers of VT-d enabled chipsets, motherboards and CPUs:&lt;br /&gt;
        http://wiki.xensource.com/xenwiki/VTdHowTo&lt;br /&gt;
&lt;br /&gt;
* If your hardware doesn&#039;t have an IOMMU (&amp;quot;Intel VT-d&amp;quot; support in case of Intel - &amp;quot;AMD I/O Virtualization Technology&amp;quot; support in case of AMD), you&#039;ll not be able to assign devices in KVM. Some work towards allowing this were done, but the code never made it into KVM, due to various issues with the code. At the moment it doesn&#039;t seem like device assignment without hardware support, will ever be integrated into KVM.&lt;br /&gt;
&lt;br /&gt;
* Assignment of graphics cards are not officially supported at the moment, but there has been success passing through a secondary Radeon HD 5850 as a VM&#039;s secondary display. It also seems like one person is currently working on writing patches for primary display support in his spare time (February, 2010):&lt;br /&gt;
        http://www.spinics.net/lists/kvm/msg25977.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assigning device to guest ==&lt;br /&gt;
&#039;&#039;&#039;1. Modifying kernel config:&#039;&#039;&#039;&lt;br /&gt;
* make menuconfig&lt;br /&gt;
* set &amp;quot;Bus options (PCI etc.)&amp;quot; -&amp;gt; &amp;quot;Support for DMA Remapping Devices&amp;quot; to &amp;quot;*&amp;quot;&lt;br /&gt;
* set &amp;quot;Bus options (PCI etc.)&amp;quot; -&amp;gt; &amp;quot;Enable DMA Remapping Devices&amp;quot; to &amp;quot;*&amp;quot;&lt;br /&gt;
* set &amp;quot;Bus options (PCI etc.)&amp;quot; -&amp;gt; &amp;quot;PCI Stub driver&amp;quot; to &amp;quot;*&amp;quot;&lt;br /&gt;
* optional setting:&lt;br /&gt;
        set &amp;quot;Bus options (PCI etc.)&amp;quot; -&amp;gt; &amp;quot;Support for Interrupt Remapping&amp;quot; to &amp;quot;*&amp;quot;&lt;br /&gt;
* exit/save&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;2. build kernel:&#039;&#039;&#039;&lt;br /&gt;
* make&lt;br /&gt;
* make modules_install&lt;br /&gt;
* make install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. reboot and verify that your system has IOMMU support&#039;&#039;&#039;&lt;br /&gt;
* AMD Machine&lt;br /&gt;
** dmesg | grep AMD-Vi&lt;br /&gt;
      ...&lt;br /&gt;
      AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40&lt;br /&gt;
      AMD-Vi: Lazy IO/TLB flushing enabled&lt;br /&gt;
      AMD-Vi: Initialized for Passthrough Mode&lt;br /&gt;
      ...&lt;br /&gt;
* Intel Machine&lt;br /&gt;
** dmesg | grep -e DMAR -e IOMMU&lt;br /&gt;
      ...&lt;br /&gt;
      DMAR:DRHD base: 0x000000feb03000 flags: 0x0&lt;br /&gt;
      IOMMU feb03000: ver 1:0 cap c9008020e30260 ecap 1000&lt;br /&gt;
      ...&lt;br /&gt;
* If you get no output you&#039;ll need to fix this before moving on. Check if your hardware supports VT-d and check that it has been enabled in BIOS.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you still get an error &amp;quot;No IOMMU found.&amp;quot;  Check dmesg for errors suggesting your BIOS is broken. Another possible reason: &lt;br /&gt;
CONFIG_DMAR_DEFAULT_ON is not set. In that case, pass &amp;quot;intel_iommu=on&amp;quot; as kernel parameter to enable it. AMD uses different kernel parameter than Intel, on AMD you need to pass &amp;quot;iommu=pt iommu=1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. unbind device from host kernel driver (example PCI device 01:00.0)&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
* Load the PCI Stub Driver if it is compiled as a module&lt;br /&gt;
        modprobe pci_stub&lt;br /&gt;
* lspci -n&lt;br /&gt;
* locate the entry for device 01:00.0 and note down the vendor &amp;amp; device ID 8086:10b9&lt;br /&gt;
        ...&lt;br /&gt;
        01:00.0 0200: 8086:10b9 (rev 06)&lt;br /&gt;
        ...&lt;br /&gt;
&lt;br /&gt;
* echo &amp;quot;8086 10b9&amp;quot; &amp;gt; /sys/bus/pci/drivers/pci-stub/new_id&lt;br /&gt;
* echo 0000:01:00.0 &amp;gt; /sys/bus/pci/devices/0000:01:00.0/driver/unbind&lt;br /&gt;
* echo 0000:01:00.0 &amp;gt; /sys/bus/pci/drivers/pci-stub/bind&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. load KVM modules:&#039;&#039;&#039;&lt;br /&gt;
* modprobe kvm&lt;br /&gt;
* modprobe kvm-intel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6. assign device:&#039;&#039;&#039;&lt;br /&gt;
* /usr/local/bin/qemu-system-x86_64 -m 512 -boot c -net none -hda /root/ia32e_rhel5u1.img -device pci-assign,host=01:00.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VT-d device hotplug ==&lt;br /&gt;
KVM also supports hotplug devices with VT-d to guest. In guest command interface (you can press Ctrl+Alt+2 to enter it), you can use following command to hot add/remove devices to/from guest:&lt;br /&gt;
* hot add:&lt;br /&gt;
        device_add pci-assign,host=01:00.0,id=mydevice&lt;br /&gt;
* hot remove:&lt;br /&gt;
        device_del mydevice&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* VT-d spec specifies that all conventional PCI devices behind a PCIe-to PCI/PCI-X bridge or conventional PCI bridge can only be collectively assigned to the same guest. PCIe devices do not have this restriction.&lt;br /&gt;
* If the device doesn&#039;t support MSI, and it shares IRQ with other devices, then it cannot be assigned due to host irq sharing for assigned devices is not supported. You will get warning message when you assign it. Notice this also apply to the devices which only support MSI-X.&lt;/div&gt;</summary>
		<author><name>Luke-Jr</name></author>
	</entry>
	<entry>
		<id>https://linux-kvm.org/index.php?title=Status&amp;diff=3586</id>
		<title>Status</title>
		<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=Status&amp;diff=3586"/>
		<updated>2011-05-27T02:01:27Z</updated>

		<summary type="html">&lt;p&gt;Luke-Jr: PCI-Express passthrough&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Status=&lt;br /&gt;
&lt;br /&gt;
KVM is included in the mainline linux kernel since 2.6.20 and is stable and fast for most workloads.&lt;br /&gt;
&lt;br /&gt;
It is also available as a patch for recent Linux kernel versions and as an external module that can be used with your favorite distro- provided kernel going back up to 2.6.16, therefore including all latest versions for Enterprise Linux Distributions.&lt;br /&gt;
&lt;br /&gt;
===Working:===&lt;br /&gt;
&lt;br /&gt;
* Intel-based hosts (requires VT capable processors)&lt;br /&gt;
* AMD-based hosts (requires SVM capable processors)&lt;br /&gt;
* Windows/Linux/Unix guests (32-bit and 64-bit)&lt;br /&gt;
* SMP hosts&lt;br /&gt;
* SMP guests (as of kvm-61, max 16 cpu supported)&lt;br /&gt;
* Live [[Migration]] of guests from one host to another (32-bit and 64-bit)&lt;br /&gt;
* See the [[Guest Support Status]] page for a list of guest operating systems known to work&lt;br /&gt;
* See the [[Host Support Status]] page for information on host hardware.&lt;br /&gt;
* Guest swapping&lt;br /&gt;
* [[Paravirtualized networking]]&lt;br /&gt;
* [[Paravirtualized block device]]&lt;br /&gt;
* [[How_to_assign_devices_with_VT-d_in_KVM|PCI-Express passthrough]]&lt;br /&gt;
&lt;br /&gt;
===In progress:===&lt;br /&gt;
&lt;br /&gt;
* [[PowerPC|PowerPC port]]&lt;br /&gt;
* IA64 port&lt;br /&gt;
* xenner (http://kraxel.fedorapeople.org/xenner), a project to run x86 xen guest (domU) kernels&lt;br /&gt;
* [https://wiki.ncl.cs.columbia.edu/wiki/index.php/AndroidVirt:MainPage ARM port]&lt;/div&gt;</summary>
		<author><name>Luke-Jr</name></author>
	</entry>
</feed>