From: Phil Daws Subject: Re: KVM & PCI Passthrough Date: Wed, 4 Dec 2013 19:09:47 +0000 (GMT) Message-ID: <2031947961.20566433.1386184187661.JavaMail.zimbra@innovot.com> References: <1894763452.20558413.1386180503817.JavaMail.zimbra@innovot.com> <1386182778.25738.363.camel@ul30vt.home> Reply-To: Phil Daws Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Alex Williamson Return-path: Received: from relay6out.redstationmail.co.uk ([81.94.193.130]:56229 "EHLO relay6out.redstationmail.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933089Ab3LDTQZ (ORCPT ); Wed, 4 Dec 2013 14:16:25 -0500 In-Reply-To: <1386182778.25738.363.camel@ul30vt.home> Sender: kvm-owner@vger.kernel.org List-ID: ----- Original Message ----- From: "Alex Williamson" To: "Phil Daws" Cc: kvm@vger.kernel.org Sent: Wednesday, 4 December, 2013 6:46:18 PM Subject: Re: KVM & PCI Passthrough On Wed, 2013-12-04 at 18:08 +0000, Phil Daws wrote: > Hello all, > > as performing some tests in my lab with PCI pass-through and not really understanding it. Here is what I have done so far: > > lspci -nn: > > 06:00.0 RAID bus controller [0104]: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] [1000:0079] (rev 05) > > modprobe pci_stub > echo "1000 0079" > /sys/bus/pci/drivers/pci-stub/new_id > echo "0000:06:00.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind > echo "0000:06:00.0" > /sys/bus/pci/drivers/pci-stub/bind > > I then create the new guest through virt-manager, add the PCI device, but when it tries to start the install it fails straight away. I have checked then IOMMU is enabled: > > dmesg | grep IOMMU > [ 0.000000] Intel-IOMMU: enabled This is not nearly enough output, my properly working Haswell i5-4430 reports: $ dmesg | grep IOMMU [ 0.000000] Intel-IOMMU: enabled [ 0.022767] dmar: IOMMU 0: reg_base_addr fed90000 ver 1:0 cap c0000020660462 ecap f0101a [ 0.023012] dmar: IOMMU 1: reg_base_addr fed91000 ver 1:0 cap d2008020660462 ecap f010da [ 0.023402] IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1 [ 0.355789] IOMMU 0 0xfed90000: using Queued invalidation [ 0.355878] IOMMU 1 0xfed91000: using Queued invalidation [ 0.355968] IOMMU: Setting RMRR: [ 0.356063] IOMMU: Setting identity map for device 0000:00:02.0 [0xbf000000 - 0xcf1fffff] [ 0.357644] IOMMU: Setting identity map for device 0000:00:1d.0 [0xbc979000 - 0xbc985fff] [ 0.357817] IOMMU: Setting identity map for device 0000:00:1a.0 [0xbc979000 - 0xbc985fff] [ 0.357981] IOMMU: Setting identity map for device 0000:00:14.0 [0xbc979000 - 0xbc985fff] [ 0.358139] IOMMU: Prepare 0-16MiB unity mapping for LPC [ 0.358234] IOMMU: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff] Make sure VT-d is enabled in the BIOS and boot with intel_iommu=on. > am running a Intel i7 4440k on a ASUS Z87-K Mobo with virtualization all enabled. Double check your CPU mode, 4440K doesn't exist according to http://ark.intel.com/ The unlocked K models often (typically) do not support VT-d, in which case you're out of luck with this CPU. Thanks, Alex --- Alex, thanks. Yeah, it is a i7-4770k, and I did set the grub line: grep iommu /etc/default/grub GRUB_CMDLINE_LINUX="intel_iommu=on" Darn, http://ark.intel.com/products/75123/Intel-Core-i7-4770K-Processor-8M-Cache-up-to-3_90-GHz?q=4770k looks like am out of luck :( Oh well, will just set up some storage from the host and pass that through to the guest. Thank you, and one I shall watch for next time.