From patchwork Tue Dec 22 09:25:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 41602 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 4C217B7BD0 for ; Tue, 22 Dec 2009 20:26:02 +1100 (EST) Received: from localhost ([127.0.0.1]:32879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NN10A-0004ow-SZ for incoming@patchwork.ozlabs.org; Tue, 22 Dec 2009 04:25:58 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NN0ze-0004oj-QQ for qemu-devel@nongnu.org; Tue, 22 Dec 2009 04:25:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NN0zZ-0004o9-A2 for qemu-devel@nongnu.org; Tue, 22 Dec 2009 04:25:25 -0500 Received: from [199.232.76.173] (port=54848 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NN0zZ-0004o6-2k for qemu-devel@nongnu.org; Tue, 22 Dec 2009 04:25:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44738) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NN0zY-0007lV-N4 for qemu-devel@nongnu.org; Tue, 22 Dec 2009 04:25:20 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBM9PGrw008980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Dec 2009 04:25:16 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBM9PEtB015639; Tue, 22 Dec 2009 04:25:15 -0500 Received: from localhost.localdomain (file.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 331F525004D; Tue, 22 Dec 2009 11:25:14 +0200 (IST) From: Avi Kivity To: Anthony Liguori , qemu-devel@nongnu.org Date: Tue, 22 Dec 2009 11:25:13 +0200 Message-Id: <1261473913-28442-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH master, stable-0.12] Don't load options roms intended to be loaded by the bios in qemu 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 The first such option rom will load at address 0, which isn't very nice, and the second will report a conflict and abort, which is horrible. Signed-off-by: Avi Kivity --- hw/loader.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index 2ceb8eb..c6bf0f1 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -654,6 +654,9 @@ int rom_load_all(void) Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { + if (!rom->addr) { + continue; + } if (addr > rom->addr) { fprintf(stderr, "rom: requested regions overlap " "(rom %s. free=0x" TARGET_FMT_plx