From: Ben-Ami Yassour Subject: Re: [PATCH 3/8] KVM: Handle device assignment to guests Date: Thu, 17 Jul 2008 21:01:36 +0300 Message-ID: <1216317696.31546.367.camel@cluwyn.haifa.ibm.com> References: <1216214225-18030-1-git-send-email-benami@il.ibm.com> <1216214225-18030-2-git-send-email-benami@il.ibm.com> <1216214225-18030-3-git-send-email-benami@il.ibm.com> <1216214225-18030-4-git-send-email-benami@il.ibm.com> <487E0E10.4000009@qumranet.com> <0122C7C995D32147B66BF4F440D30163015DC7E7@pdsmsx415.ccr.corp.intel.com> <487EE078.8020001@qumranet.com> <1216283021.31546.325.camel@cluwyn.haifa.ibm.com> <487F0361.1050106@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: "Han, Weidong" , amit.shah@qumranet.com, kvm@vger.kernel.org, Muli Ben-Yehuda , anthony@codemonkey.ws To: Avi Kivity Return-path: Received: from mtagate8.de.ibm.com ([195.212.29.157]:18350 "EHLO mtagate8.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760947AbYGQSCw (ORCPT ); Thu, 17 Jul 2008 14:02:52 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.13.8/8.13.8) with ESMTP id m6HI1fHs162354 for ; Thu, 17 Jul 2008 18:01:42 GMT Received: from d12av04.megacenter.de.ibm.com (d12av04.megacenter.de.ibm.com [9.149.165.229]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m6HI1ce41937506 for ; Thu, 17 Jul 2008 20:01:38 +0200 Received: from d12av04.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m6HI1cSH031523 for ; Thu, 17 Jul 2008 20:01:38 +0200 In-Reply-To: <487F0361.1050106@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 2008-07-17 at 11:31 +0300, Avi Kivity wrote: > Ben-Ami Yassour wrote: > >>>>> + > >>>>> +/* FIXME: Implement the OR logic needed to make shared interrupts > >>>>> on + * this line behave properly + */ > >>>>> > >>>>> > >>>>> > >>>> Isn't this a showstopper? There is no easy way for a user to avoid > >>>> sharing, especially as we have only three pci irqs at present. > >>>> > > What do you mean by only 3 (for passthrough we use whatever interrupt > > the host is using for that device)? > > > > > > There are two issue: > - shared host interrupts > - shared guest interrupts > > For shared host interrupts, I don't think there's a cost-effective > solution, especially as hosts are transitioning to MSI. But the problem > the comment describes is shared guest interrupts, where the assigned > device's interrupt is shared with another device (assigned or virtual). > > And currently we only have three shareable interrupts: 5, 10, and 11. > > See qemu's pci_set_irq() for the logic used to share interrupts. I think we'll leave this issue until we fix the more basic comments. In any case, how can we make qemu configure the assigned device to share an interrupt with another device (assigned or virtual)? Thanks, Ben