From patchwork Fri Jul 5 08:31:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 168514 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3274662ilk; Fri, 5 Jul 2019 01:40:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2engfMPZru3D0Bg09jPsMVkFDMk0NqRFO27bJINjCpB1fTXlM3z5EgLDbvISfE5xtUFjM X-Received: by 2002:aa7:c515:: with SMTP id o21mr3129002edq.2.1562316004719; Fri, 05 Jul 2019 01:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562316004; cv=none; d=google.com; s=arc-20160816; b=PfYqxkIdEaFcdb2p9/Sx96tRuMPP3nejQFCGumCL7LBrhnRuUNx7yIlZQDxGR7OfXD 0JVBbJ3EPFa863HqTT4ejW2XqoH848XXMBbdQniDQEafxUTCGaF/ae3l3S3HdTWhfYSb FDV0oGCRcqBJp22uV6309VZ170d+uEy8h7IxFTePPruiwKXrXq8QnMWGxg90tVDh6qnF S4AuQ/iSFsw6NFyp+hcJmZZp0qyFlQR5gpPksFwuCqp6xgMLF+j9C7ErpbY4d2bkZeYh q7F6+w7h4qCoVZ4lCEQ3eajzcbC8vG0i9IR9sTyguMHZe7J2KFBn2ewlp7l+19WAR+L2 bFpg== 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=ARYtvg9+Iwg0u+8Ff+c+uXYJAFMhyMxseOF7YUS7DNaUeC7GWKbyJFMn4tGWy0hK9G wGERaMqLkHZ7+1XRWcD+bQpRath+vMOdCZSF/M9ikCBXMQNH3rDTeHTyaDJOJa6iGEPG Ah5+er8XE7XJ0p3f81SwivygJaxpwlS85LYtqq49hrwbXrfP6703bU5RKw7/utWLyn/O gKn81DhMBNyUTHRsAGDGQ4lK0lzdyks128bdL8y/rMR6bzpBpI8fCoy8WTWB7/zqjLdA 84G7dWbpFQ4X+3dRKfDN6IUCHBRgH9Wc31SfrUKqdpTXb2yZ6GsgXt7YTc2fYfWtIORK AT+w== 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 q19si5074184ejt.48.2019.07.05.01.40.04 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2019 01:40:04 -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]:50570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjJlD-0006Iy-N8 for patch@linaro.org; Fri, 05 Jul 2019 04:40:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56976) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjJdi-0003Kx-OU for qemu-devel@nongnu.org; Fri, 05 Jul 2019 04:32:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjJdf-00062k-SJ for qemu-devel@nongnu.org; Fri, 05 Jul 2019 04:32:18 -0400 Received: from mail02.asahi-net.or.jp ([202.224.55.14]:37221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hjJdf-0005ou-GB for qemu-devel@nongnu.org; Fri, 05 Jul 2019 04:32:15 -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 A5C6B49AAC; Fri, 5 Jul 2019 17:32:06 +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 5042A240086; Fri, 5 Jul 2019 17:32:06 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Date: Fri, 5 Jul 2019 17:31:37 +0900 Message-Id: <20190705083141.106254-19-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190705083141.106254-1-ysato@users.sourceforge.jp> References: <20190705083141.106254-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 v22 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 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 */