From: "Alex Lyakas" <alex@zadarastorage.com>
To: <kvm@vger.kernel.org>
Subject: pci_enable_msix() fails with ENOMEM/EINVAL
Date: Mon, 19 Nov 2012 17:18:19 +0200 [thread overview]
Message-ID: <190FFE9600054603A543CCDA4408AC89@alyakaslap> (raw)
Greetings all,
I am running Ubuntu-Precise 3.2.0-29-generic #46, with stock KVM ("QEMU
emulator version 1.0 (qemu-kvm-1.0)") on a Dell R510 server. I have one
dual-port Intel's NIC 82599, of which I spawn 32 VFs from each port. I spawn
virtual machines with KVM, each VM has 4 VFs attached (two from each PF).
Once in a while, in particular when I spawn multiple VMs in parallel, I hit
an issue that one of the VFs does not have an IRQ assigned to it. I am
checking this in /proc/interrupts, looking for entries like
"kvm:0000:03:14.6". In some cases, an entry is missing for a particular VF.
As a result, the VF within the VM is non-functional.
I debugged this issue further, by adding prints to kvm.ko code. I see that
the failure happens in kvm_vm_ioctl_assigned_device/KVM_ASSIGN_DEV_IRQ path,
which calls assigned_device_enable_host_msix() function, which calls
pci_enable_msix(), which fails with EINVAL or with ENOMEM. This path is
called twice for each VF.
For the ENOMEM failure, I see that first pci_enable_msix() returns -12, and
when kvm_vm_ioctl_set_msix_nr() is called again, it sees that
adev->entries_nr != 0 and fails the call with EINVAL.
I can repro it only when spawning like 8 or 10 VMs in parallel, but it
doesn't happen every time. So it seems like this is not a resource shortage
problem, but some race somewhere.
I tested this with several version of ixgbe drivers, including the in-tree
version that comes with Precise. It reproduces with all the versions.
Can anybody advise on how to proceed debugging this issue?
Thanks,
Alex.
next reply other threads:[~2012-11-19 15:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 15:18 Alex Lyakas [this message]
2012-11-21 14:19 ` pci_enable_msix() fails with ENOMEM/EINVAL Alex Lyakas
2012-11-21 22:25 ` Alex Williamson
2012-11-22 8:52 ` Alex Lyakas
2012-11-26 20:04 ` Alex Williamson
2012-11-29 8:42 ` Alex Lyakas
2012-11-29 15:56 ` Alex Williamson
2012-12-08 12:14 ` Alex Lyakas
2012-12-10 20:45 ` Alex Williamson
2012-12-12 13:42 ` Alex Lyakas
2012-12-12 20:10 ` Alex Williamson
2012-12-18 14:46 ` Alex Lyakas
2012-12-19 23:39 ` Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=190FFE9600054603A543CCDA4408AC89@alyakaslap \
--to=alex@zadarastorage.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox