From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ryan C. Underwood" Subject: PCI passthrough resource remapping Date: Fri, 8 Jan 2010 20:45:01 -0600 Message-ID: <20100109024500.GB4727@localhost.localdomain> Reply-To: nemesis@icequake.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 To: kvm@vger.kernel.org Return-path: Received: from tulsa-1.icequake.net ([65.38.17.158]:1052 "EHLO mail.icequake.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750781Ab0AIDJX (ORCPT ); Fri, 8 Jan 2010 22:09:23 -0500 Received: from localhost (aurora [127.0.0.1]) by mail.icequake.net (Postfix) with ESMTP id 4A8F427B36 for ; Fri, 8 Jan 2010 20:45:22 -0600 (CST) Received: from mail.icequake.net ([127.0.0.1]) by localhost (aurora.icequake.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aobH6XQERvck for ; Fri, 8 Jan 2010 20:45:03 -0600 (CST) Received: from localhost (tulsa-3.icequake.net [65.38.17.160]) by mail.icequake.net (Postfix) with ESMTP id 3AC1527B26 for ; Fri, 8 Jan 2010 20:45:02 -0600 (CST) Content-Disposition: inline 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. Am I doing the right thing. I am on amd64 and using the latest qemu-kvm release 0.12.1.2 with kernel 2.6.31. It seems very hard to find documentation on the kernel parameters related to pci-passthrough. 08:09.0 0c00: 1180:0832 (rev 05) (prog-if 10) Subsystem: 103c:30cd Flags: bus master, medium devsel, latency 32, IRQ 16 Memory at f4400000 (32-bit, non-prefetchable) [size=2K] Capabilities: Kernel driver in use: ohci1394 Kernel modules: firewire-ohci, ohci1394 08:09.1 0805: 1180:0822 (rev 22) Subsystem: 103c:30cd Flags: bus master, medium devsel, latency 32, IRQ 18 Memory at f4400800 (32-bit, non-prefetchable) [size=256] Capabilities: Kernel driver in use: sdhci-pci Kernel modules: sdhci-pci 08:09.2 0880: 1180:0843 (rev 12) Subsystem: 103c:30cd Flags: bus master, medium devsel, latency 32, IRQ 10 Memory at f4400c00 (32-bit, non-prefetchable) [size=256] Capabilities: Kernel driver in use: ricoh-mmc Kernel modules: ricoh_mmc 08:09.3 0880: 1180:0592 (rev 12) Subsystem: 103c:30cd Flags: bus master, medium devsel, latency 32, IRQ 10 Memory at f4401000 (32-bit, non-prefetchable) [size=256] Capabilities: 08:09.4 0880: 1180:0852 (rev ff) (prog-if ff) !!! Unknown header type 7f -- Ryan C. Underwood,