From patchwork Mon Oct 12 09:52:25 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: 35741 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1A3E9B7063 for ; Mon, 12 Oct 2009 20:56:08 +1100 (EST) Received: from localhost ([127.0.0.1]:46245 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxHdL-0004JG-SQ for incoming@patchwork.ozlabs.org; Mon, 12 Oct 2009 05:56:03 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxHby-000426-NZ for qemu-devel@nongnu.org; Mon, 12 Oct 2009 05:54:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxHbt-0003zP-L9 for qemu-devel@nongnu.org; Mon, 12 Oct 2009 05:54:37 -0400 Received: from [199.232.76.173] (port=43018 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxHbt-0003zC-8a for qemu-devel@nongnu.org; Mon, 12 Oct 2009 05:54:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29916) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxHbs-0003Tl-Gc for qemu-devel@nongnu.org; Mon, 12 Oct 2009 05:54:32 -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 n9C9sV02030462; Mon, 12 Oct 2009 05:54:31 -0400 Received: from redhat.com (vpn-10-53.str.redhat.com [10.32.10.53]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n9C9sTAQ009072; Mon, 12 Oct 2009 05:54:30 -0400 Date: Mon, 12 Oct 2009 11:52:25 +0200 From: "Michael S. Tsirkin" To: Gleb Natapov Message-ID: <20091012095225.GA11741@redhat.com> References: <1255287547-28329-1-git-send-email-gleb@redhat.com> <1255287547-28329-3-git-send-email-gleb@redhat.com> <20091011215356.GC6411@redhat.com> <20091012065024.GS16702@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091012065024.GS16702@redhat.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: kevin@koconnor.net, qemu-devel@nongnu.org Subject: [Qemu-devel] Re: [PATCH 3/5] Use the correct mask to size the PCI option ROM BAR. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Mon, Oct 12, 2009 at 08:50:24AM +0200, Gleb Natapov wrote: > Send patch with your favorite interpretation to qemu pcbios/seabios. > The regression concern from my previous mail applicable here as well. Okay. Can you ack the following? For ROM, bit 0 is the enable bit, which we not only don't want to set, but it will stick and make us think it's an I/O port resource. For I/O and memory BARs bit 0 is read-only, so it does not matter what we write there. See Qemu pcbios commit 6ddb9f5c742b2b82b1755d7ec2a127f6e20e3806 Signed-off-by: Michael S. Tsirkin --- src/pciinit.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/pciinit.c b/src/pciinit.c index eab082a..d315526 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -137,7 +137,7 @@ static void pci_bios_init_device(u16 bdf) ofs = PCI_ROM_ADDRESS; else ofs = PCI_BASE_ADDRESS_0 + i * 4; - pci_config_writel(bdf, ofs, 0xffffffff); + pci_config_writel(bdf, ofs, 0xfffffffe); val = pci_config_readl(bdf, ofs); if (val != 0) { size = (~(val & ~0xf)) + 1;