From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Status of pci passthrough work? Date: Sun, 28 Sep 2008 07:39:13 +0300 Message-ID: <48DF0A71.6080304@redhat.com> References: <200809262020.16885.tfjellstrom@shaw.ca> <48DE2B1F.8010003@t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Amit Shah To: "Jan C. Bernauer" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:51490 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbYI1EjL (ORCPT ); Sun, 28 Sep 2008 00:39:11 -0400 In-Reply-To: <48DE2B1F.8010003@t-online.de> Sender: kvm-owner@vger.kernel.org List-ID: Jan C. Bernauer wrote: > Hi, > > I have about the same problem, so excuse me for hijacking this thread. > > My hardware consists of a 780g/SB700 Mainboard and a 4850e AMD CPU, and > I'm interested in forwarding a DVB-C tuner card to the guest. Maybe > some NICs later. > > I tried and 'sort of' got it working with Amit's kernel and userspace > tools. > First thing: > The dvb-c card has an interesting memory mapping, as reported by > lspci -v: > Memory at cfdff000 (32-bit, non-prefetchable) [size=512] > > Size 512 doesn't fly with a check in kvm_main.c: > if (mem->memory_size & (PAGE_SIZE - 1)) > goto out; > > So I patched the userspace utilities to use 4096 instead. > > With that patch, the guest saw the card, the driver got loaded, > and channel tuning works, but I get some i2c timeouts on the > guest side, and the host side has errors like: > > ------------[ cut here ]------------ > Sep 22 02:28:54 [kernel] WARNING: at kernel/irq/manage.c:180 > enable_irq+0x3a/0x55() > Sep 22 02:28:54 [kernel] Unbalanced enable for IRQ 20 > That looks due to bad error handling, due to the failures you had before. Try rebooting the host and starting again with the patched userspace. Amit, can you take a look at the error handling paths? -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.