From patchwork Fri Jun 7 15:37:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 166180 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp902515ili; Fri, 7 Jun 2019 10:15:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOpPckMQdkQAyWhGqyFfDLu0mA/SHhKq9arRyTmZPqPzfH2jRSZ13DHMQMtNheau2CnFfQ X-Received: by 2002:ac8:16ac:: with SMTP id r41mr47581284qtj.346.1559927750292; Fri, 07 Jun 2019 10:15:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559927750; cv=none; d=google.com; s=arc-20160816; b=y+FGcoHfD8MKgojjJ5ZvC+r12rZZrG/UxSR4IHuYo9jRZFNx3kZ3REuVsG3r6v+1aT ZXR7vAfugFZMVN+kUN4ISGTcmS7oT9GJagrQ2n0cas0zqVA+QR+XMNGVSDGW+bHp7DcG TdjzsaiAgF07G7Z00W/I9aYABNjnASG9YSnvM2cFzHAMfu4dktzGXkEa1YyBFIn1JULp 4Iw6j7dLSuc+bsR855Vk0I7J2xOmAGYl08A3jQpxoMdy4X24LcaPfZVQnjSDsPzQNADM hr2LwPGdqO4Kg9v5pDzzHmTYgkqMqsLUmJs8lC2JPlX1OUYqBq8I9v+3UI6T26AcvbZx pm9w== 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=vhnE0AsdyiR/wuoDtVF/kwyrZo1KctYnCMeE3cdtdoQ=; b=vJHD+8j1FfRvgbI1zeliL30yagr9Jty++9cwC0YcxMenfBNr0LpJHV2pujID9hWfP+ F+8OIhdGfL/sSIU9vPTIAwDU7BptrteDLfpy6Ownzrzf2NtJh+9+0XIVSfAVcF8/h4I/ aqwBG9Qpj9ewZr6wpuXMNL6YP02p3/E8hmKTjAq7U/ugrUMh5Lmtl7qlS/jg6+AIwavq /E0oUEG7yCLbPBlcdd+wNCW3OAgiBUYCcbi081KblTTKLKRK+VJAf2QMNURx3yrmjF76 SlZyuJ3aG7Cz/H7vkl2xOcvfnRUgfZiXhJGQWOjs73N/B8x/9D2UWI1Mcm6dNeSqnWNr L3Iw== 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"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q5si1667459qke.271.2019.06.07.10.15.50 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jun 2019 10:15:50 -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"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:49720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZISz-0002xq-Ob for patch@linaro.org; Fri, 07 Jun 2019 13:15:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53389) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGzx-0003Yj-4a for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:41:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZGxA-00020N-Fo for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:38:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47238) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZGxA-0001oJ-8o for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:38:52 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EFB14307CDD5; Fri, 7 Jun 2019 15:38:41 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.135]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 38702808A7; Fri, 7 Jun 2019 15:38:38 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Yoshinori Sato , qemu-devel@nongnu.org, Igor Mammedov , Richard Henderson Date: Fri, 7 Jun 2019 17:37:13 +0200 Message-Id: <20190607153725.18055-18-philmd@redhat.com> In-Reply-To: <20190607153725.18055-1-philmd@redhat.com> References: <20190607153725.18055-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 07 Jun 2019 15:38:42 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v18 17/29] 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= 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 --- 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 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,