kvm_mem_ioeventfd_add: error adding ioeventfd: No space left on device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Latest QEMU master fails to run with too many MMIO devices specified.
After patch 3ac7d43a6fb [1] QEMU just prints an error message and exits.
> kvm_mem_
This is reproducible e.g. with the following setup:
qemu-3.1.50-dirty \
-machine pc-i440fx-
-cpu host -m 4096 \
-smp 2,sockets=
-drive file=freebsd_
-device ide-hd,
-device virtio-
-device virtio-
-device virtio-
-device virtio-
Running with just 3 Virtio-SCSI controllers seems to work fine, adding more than that causes the error above. Note that this is not Virtio-SCSI specific. I've also reproduced this without any Virtio devices whatsoever.
strace shows the following ioctl chain over and over:
145787 ioctl(11, KVM_UNREGISTER_
145787 ioctl(11, KVM_UNREGISTER_
145787 ioctl(11, KVM_REGISTER_
145787 ioctl(11, KVM_REGISTER_
145787 ioctl(11, KVM_REGISTER_
145787 ioctl(11, KVM_REGISTER_
145787 ioctl(11, KVM_REGISTER_
145787 ioctl(11, KVM_REGISTER_
145787 ioctl(11, KVM_REGISTER_
145787 ioctl(11, KVM_REGISTER_
145787 ioctl(11, KVM_REGISTER_
Which suggests there's some kind of MMIO region leak.
[1]
commit 3ac7d43a6fbb5d4
Author: Paolo Bonzini <email address hidden>
AuthorDate: Wed Nov 28 17:28:45 2018 +0100
Commit: Paolo Bonzini <email address hidden>
CommitDate: Fri Jan 11 13:57:24 2019 +0100
memory: update coalesced_range on transaction_commit
The bug is also reproducible with virtio-9p r,path= /,security_ model=none -device virtio- 9p-pci, fsdev=r, mount_tag= r
-fsdev local,id=
I bisected it to the same commit.