From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37239 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PBKuP-00021i-8s for qemu-devel@nongnu.org; Thu, 28 Oct 2010 01:20:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PBKen-0006St-9S for qemu-devel@nongnu.org; Thu, 28 Oct 2010 01:04:13 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:45697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PBKem-0006Si-So for qemu-devel@nongnu.org; Thu, 28 Oct 2010 01:04:09 -0400 From: Isaku Yamahata Date: Thu, 28 Oct 2010 14:04:04 +0900 Message-Id: Subject: [Qemu-devel] [PATCH v2 0/2] pciinit: fix overflow when bar allocation List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: seabios@seabios.org Cc: yamahata@valinux.co.jp, cam@cs.ualberta.ca, adnan@khaleel.us, qemu-devel@nongnu.org, mst@redhat.com Okay, now added comments to members and functions as requested. No essential code change. Changes v1 -> v2: - add comment. Patch description: This patch set fixes PCI bar allocation when bar overflow occured. I checked if pmm_alloc facility can be used, but it doesn't suit for pci bar allocation. So I resulted in new API, pci_region which encapsulates region allocation and overflow checks. The first patch introduces pci_region, and the second patch fixes the overflow case with pci_region. Isaku Yamahata (2): pci: introduce pci_region to manage pci io/memory/prefmemory regions. pciinit: use pci_region functions. Makefile | 3 +- src/pci_region.c | 77 ++++++++++++++++++++++++++++++++++ src/pciinit.c | 122 ++++++++++++++++++++++++++--------------------------- src/util.h | 28 ++++++++++++ 4 files changed, 167 insertions(+), 63 deletions(-) create mode 100644 src/pci_region.c