Boot up qemu-kvm guest with 232 multiple functions disks, qemu will report a ENOSPC error, it's not good to statically increase iobus array. This patchset makes kvm_io_range array can be resized dynamically, and change dev limit to 1000. Changes from v1: - fix typo: kvm_io_bus_range -> kvm_io_range Changes from v2: - unregister device only when it exists Changes from v3: - set upper bounds to limit userspace Changes from v4: - check if allocate successfully before memcpy() - separate the change to 1000 devs to a new patch --- Amos Kong (2): KVM: resize kvm_io_range array dynamically KVM: set upper bounds for iobus dev to limit userspace include/linux/kvm_host.h | 5 +++-- virt/kvm/kvm_main.c | 40 +++++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 21 deletions(-) -- Amos Kong -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html