From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amit Shah Subject: Re: Status of pci passthrough work? Date: Sun, 28 Sep 2008 12:41:17 +0530 Message-ID: <200809281241.17512.amit.shah@redhat.com> References: <200809262020.16885.tfjellstrom@shaw.ca> <48DE2B1F.8010003@t-online.de> <48DF0A71.6080304@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: "Jan C. Bernauer" , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx1.redhat.com ([66.187.233.31]:51433 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbYI1HMh (ORCPT ); Sun, 28 Sep 2008 03:12:37 -0400 In-Reply-To: <48DF0A71.6080304@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: * On Sunday 28 Sep 2008 10:09:13 Avi Kivity wrote: > 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 suspect this is so because Jan's using very old trees. The 'master' branch used to hold the device assignment patches, They're now upstream. The patches in the 'vtd' branch are also upstream. The 'pvdma' branch is the one I should be updating. Currently, it's based on an older upstream kvm.git. I'll refresh it and drop a note. Amit