From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/8] KVM: Handle device assignment to guests Date: Thu, 17 Jul 2008 21:07:32 +0300 Message-ID: <487F8A64.60709@qumranet.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> <1216317696.31546.367.camel@cluwyn.haifa.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Han, Weidong" , amit.shah@qumranet.com, kvm@vger.kernel.org, Muli Ben-Yehuda , anthony@codemonkey.ws To: Ben-Ami Yassour Return-path: Received: from il.qumranet.com ([212.179.150.194]:13143 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760870AbYGQSHx (ORCPT ); Thu, 17 Jul 2008 14:07:53 -0400 In-Reply-To: <1216317696.31546.367.camel@cluwyn.haifa.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Ben-Ami Yassour wrote: > 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)? > > It's the guest's responsibility to assign irq lines, when running in acpi mode. In no-acpi mode, the bios assigns lines according to an algorithm in bios/rombios32.c:pci_bios_init_device(). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.