From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Richard Henderson <rth@twiddle.net>,
qemu-devel@nongnu.org,
Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH 08/12] hw/rx: Honor -accel qtest
Date: Mon, 1 Jun 2020 18:14:37 +0200 [thread overview]
Message-ID: <20200601161441.8086-9-f4bug@amsat.org> (raw)
In-Reply-To: <20200601161441.8086-1-f4bug@amsat.org>
From: Richard Henderson <richard.henderson@linaro.org>
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é <philmd@redhat.com>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200224141923.82118-19-ysato@users.sourceforge.jp>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/rx/rx62n.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c
index 13c90102b1..92d215f07a 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"
/*
@@ -217,7 +219,12 @@ static void rx62n_realize(DeviceState *dev, Error **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 */
--
2.21.3
next prev parent reply other threads:[~2020-06-01 16:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 16:14 [PATCH 00/12] hw/rx: Add RX GDB simulator machine Philippe Mathieu-Daudé
2020-06-01 16:14 ` [PATCH 01/12] target/rx/cpu: Remove unused headers Philippe Mathieu-Daudé
2020-06-01 16:14 ` [PATCH 02/12] MAINTAINERS: Add entry for RX hardware Philippe Mathieu-Daudé
2020-06-01 16:14 ` [PATCH 03/12] hw/intc: RX62N interrupt controller (ICUa) Philippe Mathieu-Daudé
2020-06-01 16:14 ` [PATCH 04/12] hw/timer: RX62N 8-Bit timer (TMR) Philippe Mathieu-Daudé
2020-06-01 16:14 ` [PATCH 05/12] hw/timer: RX62N compare match timer (CMT) Philippe Mathieu-Daudé
2020-06-01 16:14 ` [PATCH 06/12] hw/char: RX62N serial communication interface (SCI) Philippe Mathieu-Daudé
2020-06-01 16:14 ` [PATCH 07/12] hw/rx: RX62N microcontroller (MCU) Philippe Mathieu-Daudé
2020-06-01 16:14 ` Philippe Mathieu-Daudé [this message]
2020-06-01 16:14 ` [PATCH 09/12] hw/rx: Register R5F562N7 and R5F562N8 MCUs Philippe Mathieu-Daudé
2020-06-01 16:14 ` [PATCH 10/12] hw/rx: Add RX GDB simulator Philippe Mathieu-Daudé
2020-06-01 16:14 ` [PATCH 11/12] BootLinuxConsoleTest: Test the " Philippe Mathieu-Daudé
2020-06-01 16:14 ` [PATCH 12/12] docs: Document the RX target Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200601161441.8086-9-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=alex.bennee@linaro.org \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=rth@twiddle.net \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).