From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCHv4 2/2] virtio: refactor find_vqs Date: Thu, 27 Aug 2009 14:26:58 +0300 Message-ID: <20090827112656.GA21834@redhat.com> References: <200908271900.34757.rusty@rustcorp.com.au> <20090827094926.GB8391@redhat.com> <200908272032.24724.rusty@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christian Borntraeger , virtualization@lists.linux-foundation.org, Anthony Liguori , kvm@vger.kernel.org, avi@redhat.com, Carsten Otte , amit.shah@redhat.com To: Rusty Russell Return-path: Received: from mx1.redhat.com ([209.132.183.28]:7442 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750954AbZH0L2z (ORCPT ); Thu, 27 Aug 2009 07:28:55 -0400 Content-Disposition: inline In-Reply-To: <200908272032.24724.rusty@rustcorp.com.au> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Aug 27, 2009 at 08:32:24PM +0930, Rusty Russell wrote: > On Thu, 27 Aug 2009 07:19:26 pm Michael S. Tsirkin wrote: > > On Thu, Aug 27, 2009 at 07:00:34PM +0930, Rusty Russell wrote: > > > On Tue, 25 Aug 2009 09:34:34 pm Michael S. Tsirkin wrote: > > > > > That's because we didn't do the request_irq's for the per_vector case, because > > > > > we don't have the names. This is what prevented me from doing a nice > > > > > encapsulation. > > > > > > > > Yes. But let's split free_vectors out into free_msix_vectors and > > > > free_intx as well? > > > > > > Perhaps. Patch welcome :) > > > > Could you put the end result somewhere so I can work on top of it? > > Sure, it'll hit linux-next tomorrow, otherwise you can steal from > http://ozlabs.org/~rusty/kernel/rr-latest (virtio:pci-minor-cleanups.patch > and virtio:pci-minor-cleanups-fix.patch). > > > > But vector for something which isn't always the vector > > > is misleading, IMHO. > > > > I think you mean it's isn't always used? It's always a vector ... > > The non-MSI case, it's set to VIRTIO_MSI_NO_VECTOR, and we use a normal > interrupt vector. > > > BTW, let's get rid of msix_enabled completely? > > We can always use msix_vectors ... > > That would be nice. But yes, requiring more audit. > > Ideally, if msix_vectors == 0, implies intx_enabled. It seems that since we *can* request both an intx and msix vectors, it's better to have them independent even if we currently don't do that. No? > Thanks, > Rusty.