From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Neave Subject: Re: PCI Passthrough, error: The driver 'pci-stub' is occupying your device 0000:08:06.2 Date: Tue, 8 Feb 2011 10:17:42 +0000 Message-ID: References: <20110207132641.GD2665@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 To: Kenni Lund , kvm@vger.kernel.org Return-path: Received: from mail-qy0-f181.google.com ([209.85.216.181]:59079 "EHLO mail-qy0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753261Ab1BHKSE (ORCPT ); Tue, 8 Feb 2011 05:18:04 -0500 Received: by qyk12 with SMTP id 12so4586813qyk.19 for ; Tue, 08 Feb 2011 02:18:03 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Feb 8, 2011 at 9:59 AM, Kenni Lund wrote: > 2011/2/7 Daniel P. Berrange : >> On Sat, Feb 05, 2011 at 04:34:01PM +0000, James Neave wrote: >>> Hi, >>> >>> I'm trying to pass a NOVA-T-500 TV Tuner card through to a gust VM. >>> I'm getting the error "The driver 'pci-stub' is occupying your device >>> 0000:08:06.2" >> >> This is a rather misleading error message. It is *expected* that >> pci-stub will occupy the device. Unfortunately the rest of the >> error messages QEMU is printing aren't much help either, but >> ultimately something is returning -EBUSY in the PCI device assign >> step > > James, as far as I remember, I had the same issue when I set up my > system. Looking at my current (working) boot-script, apparently I've > added a 4th line which removes the pci-stub again as a > workaround....and it works: > > echo "4444 0016" > /sys/bus/pci/drivers/pci-stub/new_id > echo "0000:04:08.0" > /sys/bus/pci/drivers/ivtv/unbind > echo "0000:04:08.0" > /sys/bus/pci/drivers/pci-stub/bind > echo "4444 0016" > /sys/bus/pci/drivers/pci-stub/remove_id > > Best regards > Kenni > Hi Kenni, Can I get a bit more information on "boot-script" please? Which file exaclty have you put this in? Did you write your own service script and put it in init.d? I've tried this: echo "8086 10b9" > /sys/bus/pci/drivers/pci-stub/new_id echo 0000:01:00.0 > /sys/bus/pci/devices/0000:01:00.0/driver/unbind echo 0000:01:00.0 > /sys/bus/pci/drivers/pci-stub/bind I'll try it again with the fourth line added, manually before I start the VM. How come yours is 'echo "PCI" > /sys/bus/drivers/DRIVERNAME/unbind' and mine is echo "PCI" > /sys/bus/pci/devices/PCI/driver/unbind Obviously one looks up which driver is being used by the PCI id, but how do I look up which driver my PCI card is using? Thanks, James.