From patchwork Fri Jun 7 09:11:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 166098 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp409123ili; Fri, 7 Jun 2019 02:41:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJsf4XID5MdQkXVhnVsmxnwWqlFJn12zvhWer1ammV8eaNaquXNjgCwpk6+pa03V7znBy0 X-Received: by 2002:a37:4c11:: with SMTP id z17mr23120852qka.316.1559900498563; Fri, 07 Jun 2019 02:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559900498; cv=none; d=google.com; s=arc-20160816; b=ZJAfW6C3pRz+AsEX/mYvjz41rSKkSyvni53cdD3TsllHuHN2IIkAvjBRIyumjJj2D+ Nw3Bux7LN04ea9otSTQJ3qAx460DHi95OwbmATOr5PU2DxHUoeWk3mCqpojtpZk3IJOe duJtt254VYOshoZD2af6fVh5q4li+TIsABVQx+LEARbv/thEj8+Dxo6czIVbNKlpdJfX uYmVtirUT4prrWl6yyssxmWlG5FiK64F9iI4h3kK1/VclGwNsY1Q7GcqVXLtQezKopZr glzA/8VT0dVbTMnEzHqw8I6pvRPvJyBdm8Dl683YNP/CqNDVPNVWT4kYDiWrf9WE0UBV U2Bg== 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:references:in-reply-to :message-id:date:to:from; bh=/pUzKLRZx9aTjuzBuF7SXdJCFH14gghwhDqcU7wy0+A=; b=vft7ABZ0csQnJ0CLyc7m00pA5mwxAjU9WwKAcPjS0FdiQC4hK1Tb2erUX+GoEdQwVY XU6yRrjIBScu/toYd5OTgRLs1rSz7AoiKPhcKs83fA+TKEeBQnN+wiAAiW3sxDzuIu9y qudLW5ESz7GP4QEscwZYx84JIHhYXXTKrS3CDOFhb15ukv3srbPIvTjEyx9H/f8VLysh QDz0jICbb3YfztZrGJtTQM0FJExiLa2jgQIdOibvGzKSvepRIuHzzxmFhlBtFzabMqQv Y5w45UeQUH7Va/m6dnuu1YZB1hW5YI+MDHB1qdmuMtH/y7r/PtGe3Jv5vlioGj9CrKoR qY2g== 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.47 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.47]) by mx.google.com with ESMTPS id e123si856737qkd.258.2019.06.07.02.41.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jun 2019 02:41:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 as permitted sender) client-ip=209.51.188.47; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:47564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZBNM-000740-W6 for patch@linaro.org; Fri, 07 Jun 2019 05:41:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41424) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZAuT-0000sp-I9 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:11:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZAuP-0002vz-8U for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:11:41 -0400 Received: from mail03.asahi-net.or.jp ([202.224.55.15]:41383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hZAuO-0002rR-Pb for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:11:37 -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 F1DC649B0D; Fri, 7 Jun 2019 18:11:29 +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 8EECC240085; Fri, 7 Jun 2019 18:11:29 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 18:11:07 +0900 Message-Id: <20190607091116.49044-16-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190607091116.49044-1-ysato@users.sourceforge.jp> References: <20190607091116.49044-1-ysato@users.sourceforge.jp> 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 v17 15/24] 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, 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. Signed-off-by: Richard Henderson Signed-off-by: Yoshinori Sato --- hw/rx/rx62n.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.11.0 Reviewed-by: Philippe Mathieu-Daudé diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index 3a8fe7b0bf..e55257c622 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); + } } object_initialize_child(OBJECT(s), "cpu", &s->cpu,