public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* device limit for kvm_io_bus
@ 2010-03-30 15:56 Cam Macdonell
  2010-03-31  6:14 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Cam Macdonell @ 2010-03-30 15:56 UTC (permalink / raw)
  To: KVM General

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-31  6:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30 15:56 device limit for kvm_io_bus Cam Macdonell
2010-03-31  6:14 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox