From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWDLQ-0006UA-UW for qemu-devel@nongnu.org; Sun, 08 Feb 2009 12:21:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWDLM-0006TD-He for qemu-devel@nongnu.org; Sun, 08 Feb 2009 12:21:24 -0500 Received: from [199.232.76.173] (port=60001 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWDLM-0006T8-7S for qemu-devel@nongnu.org; Sun, 08 Feb 2009 12:21:20 -0500 Received: from mx2.redhat.com ([66.187.237.31]:34694) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWDLL-0005LE-Pl for qemu-devel@nongnu.org; Sun, 08 Feb 2009 12:21:20 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n18HLGJN031296 for ; Sun, 8 Feb 2009 12:21:16 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n18HLGau016656 for ; Sun, 8 Feb 2009 12:21:16 -0500 Received: from amt.cnet (vpn-10-93.str.redhat.com [10.32.10.93]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n18HLEat016483 for ; Sun, 8 Feb 2009 12:21:16 -0500 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id AB8A2550002 for ; Sun, 8 Feb 2009 15:20:53 -0200 (BRST) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id n18HKqoZ003848 for qemu-devel@nongnu.org; Sun, 8 Feb 2009 15:20:52 -0200 Date: Sun, 8 Feb 2009 15:20:52 -0200 From: Marcelo Tosatti Subject: Re: [Qemu-devel] [patch 13/18] qemu: warn if PCI region is not power of two Message-ID: <20090208172052.GA3729@amt.cnet> References: <20090204133303.113145633@localhost.localdomain> <20090204133924.445066836@localhost.localdomain> <200902041438.06018.paul@codesourcery.com> <20090206173408.GA22784@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sun, Feb 08, 2009 at 09:08:14AM +0300, malc wrote: > > --- trunk.orig/hw/pci.c > > +++ trunk/hw/pci.c > > @@ -249,6 +249,13 @@ void pci_register_io_region(PCIDevice *p > > > > if ((unsigned int)region_num >= PCI_NUM_REGIONS) > > return; > > + > > + if (size & (size-1)) { > > + term_printf("ERROR: PCI region size must be pow2 " > > + "type=0x%x, size=0x%x\n", type, size); > > + exit(1); > > + } > > + > > If monitor is on a vc the error message would never be seen, perhaps > it's better to fprintf it stderr instead? Agreed, will fix. Thanks.