From: Cam Macdonell Subject: device limit for kvm_io_bus Date: Tue, 30 Mar 2010 09:56:00 -0600 Message-ID: <8286e4ee1003300856u77cbce04o77c9cebfc2fd2729@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 To: KVM General Return-path: Received: from mail-iw0-f182.google.com ([209.85.223.182]:57948 "EHLO mail-iw0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753397Ab0C3P4D (ORCPT ); Tue, 30 Mar 2010 11:56:03 -0400 Received: by iwn12 with SMTP id 12so1441624iwn.21 for ; Tue, 30 Mar 2010 08:56:00 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: Hi, I'm trying to use ioeventfds for notification between guests. After assigning a handful of ioeventfds I was getting a "no space left on device error". The culprit seems to be that only 6 devices are allowed for a guest on the kvm IO bus. The comment indicates a somewhat low number was chosen. Can the limit be increased to something on the order of the number of file descriptors a process could have? /* * It would be nice to use something smarter than a linear search, TBD... * Thankfully we dont expect many devices to register (famous last words :), * so until then it will suffice. At least its abstracted so we can change * in one place. */ struct kvm_io_bus { int dev_count; #define NR_IOBUS_DEVS 6 struct kvm_io_device *devs[NR_IOBUS_DEVS]; }; from kvm_main.c int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) { struct kvm_io_bus *new_bus, *bus; bus = kvm->buses[bus_idx]; if (bus->dev_count > NR_IOBUS_DEVS-1) return -ENOSPC; ...snip... } Thanks, Cam