From patchwork Tue Jun 18 14:11:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 167166 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4340224ilk; Tue, 18 Jun 2019 08:04:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCuWZWgkz4hcuoGdv6H+2HduRJESF6KfhXNMLb6yLHpcXjtX/T+4kIwya4MQVPAd9tNmtz X-Received: by 2002:ac8:2d17:: with SMTP id n23mr38245586qta.132.1560870286186; Tue, 18 Jun 2019 08:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560870286; cv=none; d=google.com; s=arc-20160816; b=GNrR6kEJvJoZdzYUlMvgs6eaPExpNHkjLA1+3oola6WyoLaa4Pq8rL0sc55FP9DjCl prR4PipA9ADwxB1IItzMr6PGj57zlYXiI7tGyk+khNRiwSZYTC81Q3D1xoctAWuwF/P6 ELP5b8nLivI7dvDWtnhhkx+dvOiJ1+tclDzJmfJQeyYqBaErH3mG+nRHzQZ8v2OtSAMM QLUB9dqetMecnpDPqnQKW155wl8pslsxX003SLiR5jFa3Qh8BoYa+Oun78BZfYdmN0pX dccCCG52xmS6xF5nKI8gN6b3V9PlwBk7pVQzToUtP5Vs+O5+fdbc95SQ0WBVE/shgBXE Avqg== 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=WTgAchzxuRanviydbtTayWihIIXZsydUrp9wH71Hxc4=; b=Nsw5UOg/be7m5Z2xbTHloOYOtnrkpMgULWQ/clf8yk1rvqxm9epMcOUdjWAJW/09a0 hDoiAYOhItCHhE/VTonTFkOL6bON3UBH9FpDp5tcaXj4eP+UtOWoY2ER5ABWopuVmr09 PWrwgKdGNkR1h8XPPxGxqjn16NK85VYnfvCjfQzRKAL5avHJsbbkK93MfSjeLt2DZS3n IVWnEaNhL3dnf/2aqRjrm6ZB2pz0us7PpSIdHoM5GZfEAzDLNmINJzC1dE8O7jTEf9Ys HxVVSwPTevcSvChhnLqh/mhkXx7CBtGv0aUhu1iluLF2qtuR2bIVGLbFE+nNAsvIT9qh 4EiA== 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 d68si10315412qkf.180.2019.06.18.08.04.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2019 08:04:46 -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]:58782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdFfB-0007Go-J9 for patch@linaro.org; Tue, 18 Jun 2019 11:04:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60458) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdEqJ-00033y-KF for qemu-devel@nongnu.org; Tue, 18 Jun 2019 10:12:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdEqI-00009X-CJ for qemu-devel@nongnu.org; Tue, 18 Jun 2019 10:12:11 -0400 Received: from mail02.asahi-net.or.jp ([202.224.55.14]:35021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hdEqF-0007xf-MZ for qemu-devel@nongnu.org; Tue, 18 Jun 2019 10:12:09 -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 mail02.asahi-net.or.jp (Postfix) with ESMTPA id 24E0743F92; Tue, 18 Jun 2019 23:11:38 +0900 (JST) Received: from yo-satoh-debian.localdomain (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by h61-195-96-97.vps.ablenet.jp (Postfix) with ESMTPSA id C63DF240085; Tue, 18 Jun 2019 23:11:37 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Date: Tue, 18 Jun 2019 23:11:13 +0900 Message-Id: <20190618141118.52955-35-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190618141118.52955-1-ysato@users.sourceforge.jp> References: <20190618141118.52955-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.14 Subject: [Qemu-devel] [PATCH v21 18/21] 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 Signed-off-by: Yoshinori Sato --- hw/rx/rx62n.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.11.0 diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index 74d2fd0ee3..05d82d0b8f 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -21,11 +21,13 @@ #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 "sysemu/sysemu.h" +#include "sysemu/qtest.h" #include "cpu.h" /* @@ -190,8 +192,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 */