From patchwork Fri Jul 30 19:40:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 116105 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6UJeJLN016481 for ; Fri, 30 Jul 2010 19:40:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754888Ab0G3TkQ (ORCPT ); Fri, 30 Jul 2010 15:40:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18408 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754036Ab0G3TkO (ORCPT ); Fri, 30 Jul 2010 15:40:14 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6UJeEbI006489 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 30 Jul 2010 15:40:14 -0400 Received: from localhost6.localdomain6 (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6UJeDN7019143; Fri, 30 Jul 2010 15:40:13 -0400 From: Alex Williamson Subject: [PATCH 1/3] device-assignment: Fix slow option ROM mapping To: kvm@vger.kernel.org Cc: ddutile@redhat.com, chrisw@redhat.com, gleb@redhat.com, alex.williamson@redhat.com Date: Fri, 30 Jul 2010 13:40:13 -0600 Message-ID: <20100730194013.10110.49327.stgit@localhost6.localdomain6> In-Reply-To: <20100730193941.10110.92913.stgit@localhost6.localdomain6> References: <20100730193941.10110.92913.stgit@localhost6.localdomain6> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 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 (demeter.kernel.org [140.211.167.41]); Fri, 30 Jul 2010 19:40:19 +0000 (UTC) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index c56870e..c26ff6d 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -233,6 +233,8 @@ static CPUReadMemoryFunc * const slow_bar_read[] = { &slow_bar_readl }; +static CPUWriteMemoryFunc * const slow_bar_null_write[] = {NULL, NULL, NULL}; + static void assigned_dev_iomem_map_slow(PCIDevice *pci_dev, int region_num, pcibus_t e_phys, pcibus_t e_size, int type) @@ -244,7 +246,7 @@ static void assigned_dev_iomem_map_slow(PCIDevice *pci_dev, int region_num, DEBUG("%s", "slow map\n"); if (region_num == PCI_ROM_SLOT) - m = cpu_register_io_memory(slow_bar_read, NULL, region); + m = cpu_register_io_memory(slow_bar_read, slow_bar_null_write, region); else m = cpu_register_io_memory(slow_bar_read, slow_bar_write, region); cpu_register_physical_memory(e_phys, e_size, m);