From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: pci_enable_msix() fails with ENOMEM/EINVAL Date: Thu, 29 Nov 2012 08:56:10 -0700 Message-ID: <1354204570.14547.14.camel@ul30vt.home> References: <190FFE9600054603A543CCDA4408AC89@alyakaslap> <1353536723.1809.4.camel@bling.home> <1353960253.1809.128.camel@bling.home> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, linux-pci@vger.kernel.org, Yair Hershko , Shyam Kaushik To: Alex Lyakas Return-path: In-Reply-To: Sender: linux-pci-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, 2012-11-29 at 10:42 +0200, Alex Lyakas wrote: > Hi Alex, > did I understand correctly that "vector" value with which the call to > request_threaded_irq() is made is *not* supposed to be zero? Because in my > case, it is always zero, and still the failure I observe is not happening > always. Usually, 3 unique (non-zero) IRQ numbers are assigned to each > attached PCI device of each KVM VM. > I will try to repro this like you suggested and let you know. pci_enable_msix should be setting vectors for all the host_msix_entries. That non-zero vector is the first parameter to request_threaded_irq. If I put a printk in the loop installing the interrupt handler, I get: assigned_device_enable_host_msix entry 0, vector 44 assigned_device_enable_host_msix entry 0, vector 44 assigned_device_enable_host_msix entry 1, vector 45 assigned_device_enable_host_msix entry 0, vector 44 assigned_device_enable_host_msix entry 1, vector 45 assigned_device_enable_host_msix entry 2, vector 103 So we enable MSI-X with only one vector enabled, then a second vector gets enabled and we disable and re-enable with two, and so on with three. This is for an assigned e1000e device. Thanks, Alex