From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azg8t-0002am-1v for qemu-devel@nongnu.org; Mon, 09 May 2016 04:02:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azg8o-00060y-TR for qemu-devel@nongnu.org; Mon, 09 May 2016 04:02:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azg8o-00060q-O1 for qemu-devel@nongnu.org; Mon, 09 May 2016 04:02:10 -0400 Date: Mon, 9 May 2016 16:02:03 +0800 From: Peter Xu Message-ID: <20160509080203.GC3250@pxdev.xzpeter.org> References: <1462418761-12714-1-git-send-email-peterx@redhat.com> <1462418761-12714-25-git-send-email-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1462418761-12714-25-git-send-email-peterx@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 24/26] kvm-irqchip: i386: add hook for add/remove virq List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: imammedo@redhat.com, rth@twiddle.net, ehabkost@redhat.com, jasowang@redhat.com, marcel@redhat.com, mst@redhat.com, pbonzini@redhat.com, jan.kiszka@web.de, rkrcmar@redhat.com, alex.williamson@redhat.com, wexu@redhat.com, davidkiarie4@gmail.com On Thu, May 05, 2016 at 11:25:59AM +0800, Peter Xu wrote: > Adding two hooks to be notified when adding/removing msi routes. On x86 > platform, one list is maintained for all existing msi routes. Here the commit message is not accurate. Not all existing MSI routes are maintained. Only irqfd ones. There are two kinds of MSI routes: - in kvm_irqchip_add_irq_route(): before assigning IRQFD. Used by vhost, vfio, etc. - in kvm_irqchip_send_msi(): when sending direct MSI message, if direct MSI not allowed, we will first create one MSI route entry in the kernel, then trigger it. This patch only hooks the first one (irqfd case). We do not need to take care for the 2nd one, since it's only used by QEMU userspace (kvm-apic) and the messages will always do in-time translation when triggered. -- peterx