From patchwork Tue Dec 22 16:05:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 69291 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBMG7qCU030379 for ; Tue, 22 Dec 2009 16:07:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751283AbZLVQHu (ORCPT ); Tue, 22 Dec 2009 11:07:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751070AbZLVQHu (ORCPT ); Tue, 22 Dec 2009 11:07:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13396 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbZLVQHt (ORCPT ); Tue, 22 Dec 2009 11:07:49 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBMG7lcd000790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Dec 2009 11:07:47 -0500 Received: from redhat.com (vpn-6-208.tlv.redhat.com [10.35.6.208]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id nBMG7jR7026721; Tue, 22 Dec 2009 11:07:45 -0500 Date: Tue, 22 Dec 2009 18:05:01 +0200 From: "Michael S. Tsirkin" To: Alexander Graf Cc: Avi Kivity , kvm@vger.kernel.org Subject: Re: [PATCH] slow_map: minor improvements to ROM BAR handling Message-ID: <20091222160501.GC18676@redhat.com> References: <4B30CAF2.4040409@suse.de> <20091222151911.GC18541@redhat.com> <4B30E470.2030001@redhat.com> <4B30E4BB.8000507@suse.de> <20091222152806.GA18676@redhat.com> <4B30E783.7080903@suse.de> <4B30E82A.5030702@redhat.com> <4B30E891.9050908@suse.de> <4B30EA14.7020207@redhat.com> <4B30ED34.2000000@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4B30ED34.2000000@suse.de> User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 066fdb6..0c3c8f4 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -233,7 +233,8 @@ static void assigned_dev_iomem_map_slow(PCIDevice *pci_dev, int region_num, int m; DEBUG("slow map\n"); - m = cpu_register_io_memory(slow_bar_read, slow_bar_write, region); + m = cpu_register_io_memory(slow_bar_read, region_num == PCI_ROM_SLOT ? + NULL : slow_bar_write, region); cpu_register_physical_memory(e_phys, e_size, m); /* MSI-X MMIO page */