From patchwork Mon Oct 4 21:26:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 230711 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o94LQlPN026363 for ; Mon, 4 Oct 2010 21:26:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757311Ab0JDV00 (ORCPT ); Mon, 4 Oct 2010 17:26:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17368 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751155Ab0JDV0Z (ORCPT ); Mon, 4 Oct 2010 17:26:25 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o94LQPIH026055 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 4 Oct 2010 17:26:25 -0400 Received: from s20.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o94LQOYb026913; Mon, 4 Oct 2010 17:26:24 -0400 From: Alex Williamson Subject: [PATCH 1/2] PCI: Export pci_map_option_rom() To: kvm@vger.kernel.org Cc: ddutile@redhat.com, chrisw@redhat.com Date: Mon, 04 Oct 2010 15:26:24 -0600 Message-ID: <20101004212624.11167.33032.stgit@s20.home> In-Reply-To: <20101004212311.11167.40425.stgit@s20.home> References: <20101004212311.11167.40425.stgit@s20.home> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 04 Oct 2010 21:26:47 +0000 (UTC) diff --git a/hw/pci.c b/hw/pci.c index e75f226..36ca571 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1968,7 +1968,7 @@ static uint8_t pci_find_capability_list(PCIDevice *pdev, uint8_t cap_id, return next; } -static void pci_map_option_rom(PCIDevice *pdev, int region_num, pcibus_t addr, pcibus_t size, int type) +void pci_map_option_rom(PCIDevice *pdev, int region_num, pcibus_t addr, pcibus_t size, int type) { cpu_register_physical_memory(addr, size, pdev->rom_offset); } diff --git a/hw/pci.h b/hw/pci.h index ed86c57..825ccbe 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -219,6 +219,9 @@ void pci_register_bar(PCIDevice *pci_dev, int region_num, pcibus_t size, int type, PCIMapIORegionFunc *map_func); +void pci_map_option_rom(PCIDevice *pdev, int region_num, pcibus_t addr, + pcibus_t size, int type); + int pci_enable_capability_support(PCIDevice *pci_dev, uint32_t config_start, PCICapConfigReadFunc *config_read,