From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDfS8-0001BE-Md for qemu-devel@nongnu.org; Tue, 11 Oct 2011 12:45:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDfS6-00062u-Lb for qemu-devel@nongnu.org; Tue, 11 Oct 2011 12:45:16 -0400 Received: from mail.windriver.com ([147.11.1.11]:55949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDfS6-00062G-EV for qemu-devel@nongnu.org; Tue, 11 Oct 2011 12:45:14 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id p9BGj9rp006151 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 11 Oct 2011 09:45:09 -0700 (PDT) Message-ID: <4E947293.6050009@windriver.com> Date: Tue, 11 Oct 2011 11:45:07 -0500 From: Chris Krumme MIME-Version: 1.0 References: <20110922114510.GA31504@redhat.com> <20111001165043.GA16833@morn.localdomain> <20111011083024.GA16057@redhat.com> In-Reply-To: <20111011083024.GA16057@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Hang when using 9p mounts after last Seabios update List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 10/11/2011 03:30 AM, Daniel P. Berrange wrote: > On Sat, Oct 01, 2011 at 12:50:43PM -0400, Kevin O'Connor wrote: >> On Thu, Sep 22, 2011 at 12:45:11PM +0100, Daniel P. Berrange wrote: >>> On 0.14, 0.15 releaes, this all works just fine. On current GIT master, >>> the guest OS will hang during boot. >> [...] >>> To reproduce this you will need my custom initrd for mounting 9p filesystems >>> as the root FS. You can get that here: >>> >>> http://berrange.com/~dan/qemu-serial-hang-demo.tar.gz >> Thanks for the detailed report. >> >> I've confirmed the issue and tracked it down. The current SeaBIOS >> code gets confused during alignment checking if there are no prefmem >> regions found. >> >> The patch below should fix the issue. > Thanks, I have tested Seabios 1.6.3 which includes that patch, and > can confirm that it does fix the hang I saw. > > Anthony/Gerd: we can get QEMU master updated to Seabios 1.6.3 before > the 1.0 release ? > >> Author: Kevin O'Connor >> Date: Sat Oct 1 12:35:32 2011 -0400 >> >> Fix alignment bug in pci_bios_init_root_regions(). >> >> If there are no memory allocations for a given type then the "max" bar >> size is zero. However, ALIGN_DOWN does not handle an alignment of >> zero properly. Catch and handle the zero case. >> >> Signed-off-by: Kevin O'Connor >> >> diff --git a/src/pciinit.c b/src/pciinit.c >> index a857da0..0d8758e 100644 >> --- a/src/pciinit.c >> +++ b/src/pciinit.c >> @@ -536,7 +536,7 @@ static void pci_bios_init_bus_bases(struct pci_bus *bus) >> } >> } >> >> -#define ROOT_BASE(top, sum, align) ALIGN_DOWN((top)-(sum),(align)) >> +#define ROOT_BASE(top, sum, max) ALIGN_DOWN((top)-(sum),(max) ?: 1) Hello, This is adding a GNUism, can this be: (max)?(max):1 Thanks Chris >> >> static int pci_bios_init_root_regions(u32 start, u32 end) >> { > Regards, > Daniel