device limit for kvm_io_bus
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
Quoted 10 lines · Cam Macdonell
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?
There's in fact a patch on the list to do just that, at least three people have been hitting it simultaneously.
Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.