From patchwork Fri May 31 13:43:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 165538 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp796267ili; Fri, 31 May 2019 07:03:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTzvYZkfMT4gtdn7EekEDFM2k8nEV7AYRda9/SUOw7wxivLwBgLWI61pt9SV4NcpHb/9PU X-Received: by 2002:a37:4d16:: with SMTP id a22mr7475092qkb.103.1559311432141; Fri, 31 May 2019 07:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559311432; cv=none; d=google.com; s=arc-20160816; b=dCKJu+1hBPaeyWrqCyhl7N3fFJyLIaJKgpdH34bsCEJpJr5hLvFjuxEng7aa0qbnnT bFPlksvp2yzbbTyUS5VucbsCuTNOYXog6Ma3xOSHarzemeuIMvkKA3/7k+19+aiKy4u1 mkXSqrxXAex3B6dEwFAoI0tFHdlsapLRMEzSKk0jM4JlDe3W/Q9Yveasm23e9d+oCLbd 1JFRFZF8QHQNt29Vw8ODYp5EehIlmD0g/IW0eSTuxUrJ+Rm2cSUDN0S9WDXNZcEiJV4K 87lJgSb3p4FhXEnyLTGFsLYCxysD6Ec2ap48h3PVy7iK92iG9kZYxfVk0ED5h2Dcr61b T8wA== 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:dkim-signature; bh=rNgSWAbxlywlQ4KxHC7oNVwolWTAQUxbjiBFeCf/M3w=; b=GY0b4ao6jRiU64FEca4xNm5W80m9OR7bqlb5yL1m7fRmg/SkFxlhx8GiSLPa4YLSxx 3EuSSQ6ipzK2ZXoSM1tNS5BAM8aQ/dQ/xaL1Qs3qJsK88ao6jqQYHXG8rG1kvBJsF0w1 /f96iDZ/on0fnqUKRXBqk7TGrnkqqKZ0sCmbYuDPX8mb39qVoTMOOVVR/HakiNKSiPCQ j2fauerdU7qJA3X44hSc/h1TKwBblqj/KgU8UG/pVKHI62iYrpfzLhNGoG7tEbtrc92N MhuXrlHAsJD7h9qgKRO4QtFp2tDkIbOEWB3q/EADn7gPuudtIVp9UVnZMTjOu6JwcFC2 qu3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=W5o53EZB; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c6si3533714qvu.178.2019.05.31.07.03.52 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 31 May 2019 07:03:52 -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; dkim=fail header.i=@linaro.org header.s=google header.b=W5o53EZB; 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=linaro.org Received: from localhost ([127.0.0.1]:44091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWi8N-0006XA-Pi for patch@linaro.org; Fri, 31 May 2019 10:03:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWhos-0007XO-PJ for qemu-devel@nongnu.org; Fri, 31 May 2019 09:43:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWhor-0000Tj-Pe for qemu-devel@nongnu.org; Fri, 31 May 2019 09:43:42 -0400 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]:33115) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWhor-0000Sq-Kt for qemu-devel@nongnu.org; Fri, 31 May 2019 09:43:41 -0400 Received: by mail-ot1-x341.google.com with SMTP id n18so9230387otq.0 for ; Fri, 31 May 2019 06:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rNgSWAbxlywlQ4KxHC7oNVwolWTAQUxbjiBFeCf/M3w=; b=W5o53EZBCXmYPS30t0zcWJXRsn1SgcwCAZqNHFiwmu/wst3HCvKHp2/pzgCBEgagBr NnuaJBPK9EuzOH/2yL9beFP5dzXvxuRq5a7BwDbQSNPyzrI/HaIedQFoWqNVtq4nItkO lWZ4bd2gCnUA4r2phqnCV99sUA/osZX3Xh14V4ShbIfAyGvETsRAqWnqG+v1xpt14p6o Q7eUGqUZ4m25bCT/zRsar8Xf3yHGLqf8Ey0zh2hYZ7XFTyhfKUFdjtBqCHIYtPK+KsOp uLxD59JOj+giHXkz5sBVkZiKp7XRVVCZsJgIh1S5BBvAD0o1BrQ23U+UG1eWVJE4Lciz WX2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rNgSWAbxlywlQ4KxHC7oNVwolWTAQUxbjiBFeCf/M3w=; b=G0xSsJPU/jNsHhj2wufTBSHwIY05b0IFcG7syN3A0yYGoAe7djgPRu/F7pzmaTqxM1 AGjQjDZqlgZrP6iF8nU0qr+Outdo55kDZnuECGXRHUEw/5pf+YoiKxO4nI1QX9Rv5JaL uKJwEJotczMXXs/gMwzIQEQl8Kx5j6apqtn9AmZAvnGydRc4OMrHXDkLqWaAbq2jPd+e +F3Oq2KWXAZ0sCewS5VX2sntYM68ruy22i1c8fl0sq+NMWyLg0Q8lVAfXt9az3eLfgBU NSLiEO1oTVQDLiKrpELVZE11SPVZivAsrJy5iXPLaxwJeN12Yka+7G/ZC24Va2KqR9+D IsYg== X-Gm-Message-State: APjAAAUa6r5zn3yw8YEtK1TiPvw7YtIzeFmGKvoPTOTDBRNbc7ZXdG6q 5SXk3oii6jLFsJBy+296P2SRp9fAQK733w== X-Received: by 2002:a9d:6296:: with SMTP id x22mr1892564otk.94.1559310220869; Fri, 31 May 2019 06:43:40 -0700 (PDT) Received: from localhost.localdomain (168.189-204-159.bestelclientes.com.mx. [189.204.159.168]) by smtp.gmail.com with ESMTPSA id r23sm2391176otg.49.2019.05.31.06.43.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 06:43:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 31 May 2019 08:43:07 -0500 Message-Id: <20190531134315.4109-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190531134315.4109-1-richard.henderson@linaro.org> References: <20190531134315.4109-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::341 Subject: [Qemu-devel] [PATCH v16 15/23] hw/rx: Honor -accel qtest X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: philmd@redhat.com, ysato@users.sourceforge.jp Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- hw/rx/rx62n.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.17.1 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,