From: Ben-Ami Yassour Subject: PCI PT: irq issue Date: Wed, 18 Jun 2008 15:56:16 +0300 Message-ID: <1213793776.9177.60.camel@lnx-benami> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Muli Ben-Yehuda , "Han, Weidong" To: Amit Shah Return-path: Received: from mtagate8.uk.ibm.com ([195.212.29.141]:29053 "EHLO mtagate8.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750749AbYFRM4S (ORCPT ); Wed, 18 Jun 2008 08:56:18 -0400 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate8.uk.ibm.com (8.13.8/8.13.8) with ESMTP id m5ICuHLc232174 for ; Wed, 18 Jun 2008 12:56:17 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m5ICuHsu950500 for ; Wed, 18 Jun 2008 13:56:17 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m5ICuGh2015885 for ; Wed, 18 Jun 2008 13:56:17 +0100 Sender: kvm-owner@vger.kernel.org List-ID: Amit, With the current implementation we have an issue if the driver on the host was never loaded. To be able to run kvm with passthrough we have to load and then unload the driver on the host at least once. After that it works ok. Note that after doing the load and unload the irq as reported by lspci -v is changed. The questions that I think we need to figure out are: 1. How does the loading of the driver on the host causes the irq to change? 2. What other side effects does it do that helps kvm pcipt work? 3. What do we need to add to the pcipt code that will do the same "side effect" (or bypass the problem)? Also note that in the current implementation the user is required to provide the irq for the device in the kvm command line. With respect to the comments above it is clear that lspci will show an irrelevant irq value. Why do we need the user to provide this information anyhow? Why can't KVM find it out automatically? Note, if the kernel can find this information then we can also remove it from the ioctl interface. Thanks, Ben