From patchwork Tue Jun 11 11:37:25 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: 166426 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2257132ilk; Tue, 11 Jun 2019 04:55:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyorEcscJ3ODuXeEWSCZpu4BZ25c3/lYVZEBxhiTB/UtZkqJQymKRu482T+nx7r4Tsb12Ul X-Received: by 2002:ac8:353a:: with SMTP id y55mr18120619qtb.146.1560254100847; Tue, 11 Jun 2019 04:55:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560254100; cv=none; d=google.com; s=arc-20160816; b=ekIXruExL9MK3mtIp3GwsTgrR7eeub0SuVb/MqXbJdMkBFBCoRnaNeVhT9deegWr+d nz1ZUl1f1ZStHpsF2gGRqdI76jz5nCXwPnzVp18zqkSC+3qVSSR5MFUdgFMvVxaladIS h9wX9hBH0wPFQfdolebZgCOFKi3DuYiBO92Zp5RmR1CEBVfiybtbzspa+F2yshgOdsCj 7imoCWxcIlQgkccpQyCZ5hZPZ+xifqmEkDyvUi1CSCcs9o/2UzWuYpLyDrqJt2kvqmGq qQGuQiN1EWVGcEgU8qHj6Va0bo891LF0oLHBBJjEEq0dKxKwdqpOIvvAZZyJ0DSqlJ3A 1S4A== 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=JB0kXqzdp/H7+LvM4wpGm5j6GmK+IeWHWhHXeVEfqLM=; b=cdvpPsW5zn9pFzp9vH1bBtCmZhho+VK13r76MF+2WyMUWRVo1ip2+fZ65u1ykWp7zx qHcglQ1EqtPciXOjTAyboqXUC1zEGociImIl0vxXN9xEVyyFEZ8suink5MtxexGqFoLe /F3V2WHx6vAo3JLWxz17GbtSZ9sHX0b+8VGwCfXvWmPNPFguoYN3SPMcei7NXQinVlat MEibAK5GHbshNN1YkdBiJ+HCf5y2/jraMY/cSi2d4NlBMigymXMXfAJTw1e+XdrMlF+b 57A2fN5h7+L3cm2A4icCx3/LjtQcA6nVmpzuLZvLtacfBoG7SM8AihJgi4vHOVnsFCxZ fDYw== 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 a185si4577100qkd.80.2019.06.11.04.55.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Jun 2019 04:55:00 -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]:56710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hafMi-0002rS-Ep for patch@linaro.org; Tue, 11 Jun 2019 07:55:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52421) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hafA8-00071Q-Pc for qemu-devel@nongnu.org; Tue, 11 Jun 2019 07:42:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1haf6w-0000wv-9H for qemu-devel@nongnu.org; Tue, 11 Jun 2019 07:38:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59852) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1haf6w-0000m1-2q for qemu-devel@nongnu.org; Tue, 11 Jun 2019 07:38:42 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8358C30F1BDC; Tue, 11 Jun 2019 11:38:29 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.167]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0C8560BF1; Tue, 11 Jun 2019 11:38:27 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Igor Mammedov Date: Tue, 11 Jun 2019 13:37:25 +0200 Message-Id: <20190611113731.16940-16-philmd@redhat.com> In-Reply-To: <20190611113731.16940-1-philmd@redhat.com> References: <20190611113731.16940-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 11 Jun 2019 11:38:29 +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 v19 15/21] 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: Richard Henderson , Yoshinori Sato , =?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 --- 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 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 */