From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amos Kong Subject: [PATCH v6 0/2] fix ENOSPC issue of iobus dev Date: Thu, 08 Mar 2012 10:03:46 +0800 Message-ID: <20120308020215.9413.63371.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]:7530 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494Ab2CHCDt (ORCPT ); Wed, 7 Mar 2012 21:03:49 -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 Changes from v5: - memcpy() two times, drop sort --- 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 | 38 ++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 22 deletions(-) -- Amos Kong