From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCHv3] qemu-kvm: enable msi with irqchip Date: Tue, 07 Jul 2009 14:21:39 +0300 Message-ID: <4A532FC3.6030103@redhat.com> References: <20090705173545.GA9882@redhat.com> <4A50EAD4.8010800@redhat.com> <20090705182633.GA3073@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:50797 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754908AbZGGLTN (ORCPT ); Tue, 7 Jul 2009 07:19:13 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n67BJHn9025396 for ; Tue, 7 Jul 2009 07:19:17 -0400 In-Reply-To: <20090705182633.GA3073@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/05/2009 09:26 PM, Michael S. Tsirkin wrote: > On Sun, Jul 05, 2009 at 09:03:00PM +0300, Avi Kivity wrote: > >> On 07/05/2009 08:35 PM, Michael S. Tsirkin wrote: >> >>> Support msi-x with irqchip in kernel: allocate entries >>> when they are used, and update when they are unmasked. >>> >>> @@ -340,6 +447,10 @@ void msix_notify(PCIDevice *dev, unsigned vector) >>> msix_set_pending(dev, vector); >>> return; >>> } >>> + if (kvm_enabled()&& qemu_kvm_irqchip_in_kernel()) { >>> + kvm_set_irq(dev->msix_irq_entries[vector].gsi, 1, NULL); >>> >>> >> Toggle back to zero after setting to one, for consistency. >> > > You don't really want that. It's an extra system call, on a data path > operation. > Yes I do. I don't want 'level' to mean one thing for msi and another for other interrupts. If the extra system call ends up hurting, we can add KVM_TOGGLE_IRQ or define a new level that means 'toggle'. -- error compiling committee.c: too many arguments to function