From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ryan C. Underwood" Subject: Re: PCI passthrough resource remapping Date: Sun, 10 Jan 2010 15:53:48 -0600 Message-ID: <20100110215347.GE4727@localhost.localdomain> References: <20100109024500.GB4727@localhost.localdomain> Reply-To: nemesis@icequake.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Cc: kvm@vger.kernel.org To: Alexander Graf Return-path: Received: from tulsa-1.icequake.net ([65.38.17.158]:36821 "EHLO mail.icequake.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750702Ab0AJVyF (ORCPT ); Sun, 10 Jan 2010 16:54:05 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: > > I have a multifunction PCI device that I'd like to pass through to KVM. > > In order to do that, I'm reading that the PCI memory region must be 4K-page > > aligned and the PCI memory resources itself must also be exact multiples > > of 4K pages. > > > > I have added the following on my kernel command line: > > reassign_resources reassigndev=08:09.0,08:09.1,08:09.2,08:09.3,08:09.4 > > > > But I don't know if it has any effect. The resources are still not > > sized in 4K pages. Also, this seems to screw up the last device. > > I submitted a patch to qemu-kvm recently that got rid of that limitation. Please try out if the current git head works for you. This works around that particular limitation, but now it looks like I have to have VT-D for this to work at all. (It seems so hard to find documentation about PCI passthrough, probably because things are changing all the time.) device: 08:09.0: driver="pci-assign" host="08:09.0" device: 08:09.1: driver="pci-assign" host="08:09.1" device: 08:09.2: driver="pci-assign" host="08:09.2" device: 08:09.3: driver="pci-assign" host="08:09.3" device: 08:09.4: driver="pci-assign" host="08:09.4" PCI region 0 at address 0xf4400000 has size 0x800, which is not a multiple of 4K. You might experience some performance hit due to that. No IOMMU found. Unable to assign device "08:09.0" Failed to deassign device "08:09.0" : Invalid argument Error initializing device pci-assign -- Ryan C. Underwood,