From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amos Kong Subject: [RESEND PATCH v5 0/2] fix ENOSPC issue of iobus dev Date: Wed, 07 Mar 2012 21:20:04 +0800 Message-ID: <20120307131807.27621.19355.stgit@dhcp-8-167.nay.redhat.com> References: <20120301070136.28053.71067.stgit@dhcp-8-167.nay.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: jasowang@redhat.com, mtosatti@redhat.com, alex.williamson@redhat.com, kvm@vger.kernel.org, levinsasha928@gmail.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47225 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755214Ab2CGNUH (ORCPT ); Wed, 7 Mar 2012 08:20:07 -0500 In-Reply-To: <20120301070136.28053.71067.stgit@dhcp-8-167.nay.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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