From patchwork Sat Dec 21 14:42:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 182352 Delivered-To: patch@linaro.org Received: by 2002:a92:1f98:0:0:0:0:0 with SMTP id f24csp1884593ilf; Sat, 21 Dec 2019 06:43:22 -0800 (PST) X-Google-Smtp-Source: APXvYqx+zIDhGFIO+yQsjWVHG8zTCZKzGFly8+2umDpeHHApfTwPKwhAl3Vq8BIRA+7IDnheD9GQ X-Received: by 2002:aed:22c8:: with SMTP id q8mr16590100qtc.133.1576939401928; Sat, 21 Dec 2019 06:43:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576939401; cv=none; d=google.com; s=arc-20160816; b=k6EV8OGjQyO97y0NiTtwPd/ltqbwP0upfG1QOHlHm8NY6puiqrJCk89AL6lAKFZzwG y4WCdQT8wWeeLl4ZGQWRP4Jj3N4tN8O4htIfp45PFoH9PBqYZX+gMiUzr0bW8MXMTyoV MP7V7XwOXOt5NPcgbAyTyPJ9OKTkFXSSSmjr0C+wM9BYEsPrv2blGJRxGR7J2dijpTZO 2hAIRPjMWvbKDxHkfiYHTSxaoZWGBqeNieV0IDIhRewJbwzTGJZh6KRXcr5NUj8Y6iE6 xb6fd2EX0+Tjprbo28HHklU7udaVwqZcyygXxuNEAJfRfx8JY9cvk3yhOi6a/5EWNiSc +Y7Q== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=aJJM0vtTHXXmtrVHVv2W28wyOU8ZxR/iN7ySpCdtVXQ=; b=gBeL9kPhGueMTsfFXZeMqxVVLUxrzHyTw8N2mM1I2q/cm5I9QTZK0mJEQ2g+vSejOp eF7TXP5UuhCHQJVHeMO5LCNPRXRM74QnGhW6WmvjK9poReZWOv8AdkwnKTphRDEm6ulp HV+NMcUw9NN5h6zvKqOaJz/UumRx/TTPKlZF8od0lxN3BxP97MCNuxmH/8HNPXnEtkRw CMJjRgpZspuyoiZITjzyqk34piEb/eHJHgxQ4C4dVBRgAE7OSaAjRbAqNWBM1CHwcFZU RVIZEszoRQhUZ+M6dsEQdAJB7YOxe8DRQlPuM8D5+0ywf9Ms8jz1dOyNl+RXdjBtom8/ F1Iw== 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 v36si6059810qta.93.2019.12.21.06.43.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Dec 2019 06:43:21 -0800 (PST) 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]:39680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iifyS-0005Jd-TV for patch@linaro.org; Sat, 21 Dec 2019 09:43:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46566) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iify3-0005Fn-Dc for qemu-devel@nongnu.org; Sat, 21 Dec 2019 09:42:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iify1-0002HO-Eq for qemu-devel@nongnu.org; Sat, 21 Dec 2019 09:42:55 -0500 Received: from mail03.asahi-net.or.jp ([202.224.55.15]:53081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iify0-0002Do-Rb for qemu-devel@nongnu.org; Sat, 21 Dec 2019 09:42:53 -0500 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 019D3A7EFD; Sat, 21 Dec 2019 23:42:52 +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 BB4F924008F; Sat, 21 Dec 2019 23:42:51 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Subject: [PATCH v27 18/21] hw/rx: Honor -accel qtest Date: Sat, 21 Dec 2019 23:42:35 +0900 Message-Id: <20191221144238.127766-19-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191221144238.127766-1-ysato@users.sourceforge.jp> References: <20191221144238.127766-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 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: philmd@redhat.com, Richard Henderson , Yoshinori Sato 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 */