From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v4] KVM: Allow host IRQ sharing for assigned PCI 2.3 devices Date: Tue, 06 Mar 2012 16:41:54 +0100 Message-ID: <4F563042.1020703@siemens.com> References: <4F4CD47A.3080708@siemens.com> <4F562E69.4040907@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm , Alex Williamson , "Michael S. Tsirkin" To: Avi Kivity Return-path: Received: from thoth.sbs.de ([192.35.17.2]:23937 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754212Ab2CFPl7 (ORCPT ); Tue, 6 Mar 2012 10:41:59 -0500 In-Reply-To: <4F562E69.4040907@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2012-03-06 16:34, Avi Kivity wrote: > On 02/28/2012 03:19 PM, Jan Kiszka wrote: >> PCI 2.3 allows to generically disable IRQ sources at device level. This >> enables us to share legacy IRQs of such devices with other host devices >> when passing them to a guest. >> >> The new IRQ sharing feature introduced here is optional, user space has >> to request it explicitly. Moreover, user space can inform us about its >> view of PCI_COMMAND_INTX_DISABLE so that we can avoid unmasking the >> interrupt and signaling it if the guest masked it via the virtualized >> PCI config space. > > Long delay, sorry. > > I'm sure we discussed this before, so a URL would be sufficient: why > cannot this be transparent to userspace? Yes, we did, and you may recall I tried hard to implement it. The reasons for not following this path were given in one of the previous postings: "To recall the history of it: I tried hard to implement an adaptive solution that automatically picks the fastest masking technique whenever possible. However, the changes required to the IRQ core subsystem and the logic of the device assignment code became so complex and partly ugly that I gave up on this. It's simply not worth the pain given that legacy PCI interrupts are rarely raised for performance critical device at such a high rate (KHz...) that you can measure the difference." > > As for the actual patch, I am so unfamiliar with the device assignment > code now that I'll have to rely on Alex's review. > Then let's hope he didn't miss any of my bugs. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux