From patchwork Thu Sep 12 06:06:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 173668 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp1704224ilq; Wed, 11 Sep 2019 23:09:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8Yfpl+rM3/at34BZ2DoIwwKsB8MW8yskT+2l4YkcxOVlpcm+0C0y7K7qkqOZXJuNtV2k7 X-Received: by 2002:a17:906:6b0f:: with SMTP id q15mr32819188ejr.200.1568268540787; Wed, 11 Sep 2019 23:09:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568268540; cv=none; d=google.com; s=arc-20160816; b=Zm9ZYNqlO32O5MXNQB+jZoCdkEtGIsx2RlgIMVl+5vl3jqBynswRfaHHXI6aVTYPla /jn7vXgKHXx+kufq+XticvtY5afZo3VyqCoYrpYGoQ+TucDHPuJ/R4PE6KHvArhmUlcp BMAe7VJmp3lG/WugnqJj/dBzoBBYkegENuquOQxxvca6npHRXR55hK0ymv3iHKBZRUXm mw8kK2bqG9x3R8+UwcN78bZ0Z6lZtaOjNWvN+re+oiyNGyUhBRxSpRfZMv5ie00P/p6m R5WRjNaIJQcpQs/KO/PGIeGi5ZxnvnqtwK4/sUQ3qs08DqnEHV1618JnwobMQu8nxW1x VmVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from; bh=aJJM0vtTHXXmtrVHVv2W28wyOU8ZxR/iN7ySpCdtVXQ=; b=GlldgG4B8XhHFX1xjkJ2XIIxSqg1gRsHP2P+Eu6OghQByM9Htg8tdQ2UngMIeK8jJ1 yTiqrJaifwya1s18yvpTXy5ZxOLvFZq3XTAzLTivOlylUPmQVo559N1clyrGOwq4NER0 Sdv09azBTcxXIWpbqmbQUxDEkAqEunMoHP5pu5jz/XLkP5mywnEn6u60ll+zAc1CVN6L LaLrGeCrcQvRVqyhDoEMhFwYnNuwpxAvWjQrlHAzeDjR2Xg46CSadZ3Tj2Cjh3SQjv26 lQuzUnQXiup79g7dQFvf+2pQtyVPrdmDjBgs9Fiz0LGDeCmouxCoT488IFCiXu2SD785 nTDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f35si15667963eda.415.2019.09.11.23.09.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2019 23:09:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:58348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8IHq-0002PD-VW for patch@linaro.org; Thu, 12 Sep 2019 02:08:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36933) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8IGB-0002Ly-7J for qemu-devel@nongnu.org; Thu, 12 Sep 2019 02:07:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8IG8-00088v-JQ for qemu-devel@nongnu.org; Thu, 12 Sep 2019 02:07:15 -0400 Received: from mail03.asahi-net.or.jp ([202.224.55.15]:44443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i8IG8-00087R-8S for qemu-devel@nongnu.org; Thu, 12 Sep 2019 02:07:12 -0400 Received: from h61-195-96-97.vps.ablenet.jp (h61-195-96-97.ablenetvps.ne.jp [61.195.96.97]) (Authenticated sender: PQ4Y-STU) by mail03.asahi-net.or.jp (Postfix) with ESMTPA id 9013768318; Thu, 12 Sep 2019 15:07:11 +0900 (JST) Received: from yo-satoh-debian.localdomain (ae227063.dynamic.ppp.asahi-net.or.jp [14.3.227.63]) by h61-195-96-97.vps.ablenet.jp (Postfix) with ESMTPSA id 48996240085; Thu, 12 Sep 2019 15:07:11 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Date: Thu, 12 Sep 2019 15:06:57 +0900 Message-Id: <20190912060701.4642-19-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190912060701.4642-1-ysato@users.sourceforge.jp> References: <20190912060701.4642-1-ysato@users.sourceforge.jp> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.224.55.15 Subject: [Qemu-devel] [PATCH v24 18/22] hw/rx: Honor -accel qtest X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, imammedo@redhat.com, Richard Henderson , Yoshinori Sato , philmd@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Issue an error if no kernel, no bios, and not qtest'ing. Fixes make check-qtest-rx: test/qom-test. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-16-ysato@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- We could squash this with the previous patch --- hw/rx/rx62n.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index ac47f2a397..a0986fd15e 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -21,12 +21,14 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/error-report.h" #include "hw/hw.h" #include "hw/rx/rx62n.h" #include "hw/loader.h" #include "hw/sysbus.h" #include "hw/qdev-properties.h" #include "sysemu/sysemu.h" +#include "sysemu/qtest.h" #include "cpu.h" /* @@ -191,8 +193,14 @@ static void rx62n_realize(DeviceState *dev, Error **errp) memory_region_init_rom(&s->c_flash, NULL, "codeflash", RX62N_CFLASH_SIZE, errp); memory_region_add_subregion(s->sysmem, RX62N_CFLASH_BASE, &s->c_flash); + if (!s->kernel) { - rom_add_file_fixed(bios_name, RX62N_CFLASH_BASE, 0); + if (bios_name) { + rom_add_file_fixed(bios_name, RX62N_CFLASH_BASE, 0); + } else if (!qtest_enabled()) { + error_report("No bios or kernel specified"); + exit(1); + } } /* Initialize CPU */