From patchwork Tue Jun 9 07:31:59 2020 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: 1305625 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=BNlkJVAc; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h21S3r7kz9sQx for ; Tue, 9 Jun 2020 17:34:04 +1000 (AEST) Received: from localhost ([::1]:51010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYll-00063Q-QX for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:34:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkA-00044d-Nz for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:23 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:33597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYk9-0007W4-92 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:22 -0400 Received: by mail-wm1-x343.google.com with SMTP id j198so1627405wmj.0 for ; Tue, 09 Jun 2020 00:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JxuhWv9nXttnrpgLvIV7ogduNdbBfeeeDDN47mb5Gl0=; b=BNlkJVAcy9QDjcpfKBwuM5HDZ1wqLj/PU5aemqJpOIA0MAi1G8peFA7U8ETWQLGJEF gRw740JrKo/862lSfvGPxsBDREaFU1dN2E0bK6JNLIKaiLR9cJFO/UcyrKAWBNaL8Xcc K6S+Wvhif9HW65++3qafkzAoH63pTNTjB4/d5c8BDDdan2A8DBp6ROeyuFxdZMtr0Yqp sLr0/tnTvMiNqiPDY0ZKZHtQ2kp8oMrUmEms9OGO58M+nd2iLGxcWFzqDhCgB8CiKuyJ 9c6k27+cmf90qszXHsvC+OmWW74TvFFOq94QGWdn5RK2edAf384Cbi03ddV+xBusJ/4s oJbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=JxuhWv9nXttnrpgLvIV7ogduNdbBfeeeDDN47mb5Gl0=; b=edlI9XYWXvhKt/m2Xq0T875/jW/4FQBg32ONQGgQYFaBMDoq1iBmuxdr/g3XZhsagw INz8fmb9FfoYSlv7AnovPIqMoLn2QNGQiLyUjDxI4kxWCq9rJujWUKjDboYqkCrIJVQF 4CfgibAMZjgPa7P335CjX2p0Nr05HCe3DWASIHR/qwcfdZrKZu6C+2hH9mEwqh/8ZZvV YYDs0AwnDEfC3A9X99spHkLmDs5IPx2REVtbEjnHwm86zz9jsUYlPC/wxlXtBTN+PeJY xGdiUjSO4BTJ4yD6myKKs4T5M0b5sePUPhGaNtr3VkVqNqiLcG4N2aaoeud+iljexmbl Tmsg== X-Gm-Message-State: AOAM530k4RUihNGX82VuGvDjZyTH4F9gMS5Nxg2mh5ZHmLPSlf1hwXP4 lGdTeZSjS1fyANx7KJHqyzmo8021 X-Google-Smtp-Source: ABdhPJxVxBgChIBeV/o3pwdMWP2OoADwKmrY5OHvranrqwlsdxgcy6Mv9+W6ex7JRNSSlwLfPSOFUA== X-Received: by 2002:a1c:38c2:: with SMTP id f185mr2701861wma.79.1591687937323; Tue, 09 Jun 2020 00:32:17 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 01/16] hw/sparc/sun4m: Use UnimplementedDevice for I/O devices Date: Tue, 9 Jun 2020 09:31:59 +0200 Message-Id: <20200609073214.14079-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" These devices are not slots on a bus, but real I/O devices that we do not implement. As the ISDN ROM would be a ROMD device, also model it as UnimplementedDevice. Reviewed-by: Artyom Tarasenko Message-Id: <20200510152840.13558-2-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/sun4m.c | 11 +++++++---- hw/sparc/Kconfig | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 8dda3f7292..fa3dd7775f 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -47,6 +47,7 @@ #include "hw/nvram/fw_cfg.h" #include "hw/char/escc.h" #include "hw/empty_slot.h" +#include "hw/misc/unimp.h" #include "hw/irq.h" #include "hw/loader.h" #include "elf.h" @@ -968,7 +969,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, } if (hwdef->sx_base) { - empty_slot_init(hwdef->sx_base, 0x2000); + create_unimplemented_device("SUNW,sx", hwdef->sx_base, 0x2000); } nvram = m48t59_init(slavio_irq[0], hwdef->nvram_base, 0, 0x2000, 1968, 8); @@ -1031,14 +1032,16 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, if (hwdef->dbri_base) { /* ISDN chip with attached CS4215 audio codec */ /* prom space */ - empty_slot_init(hwdef->dbri_base+0x1000, 0x30); + create_unimplemented_device("SUNW,DBRI.prom", + hwdef->dbri_base + 0x1000, 0x30); /* reg space */ - empty_slot_init(hwdef->dbri_base+0x10000, 0x100); + create_unimplemented_device("SUNW,DBRI", + hwdef->dbri_base + 0x10000, 0x100); } if (hwdef->bpp_base) { /* parallel port */ - empty_slot_init(hwdef->bpp_base, 0x20); + create_unimplemented_device("SUNW,bpp", hwdef->bpp_base, 0x20); } initrd_size = 0; diff --git a/hw/sparc/Kconfig b/hw/sparc/Kconfig index 22aff2f5b7..91805afab6 100644 --- a/hw/sparc/Kconfig +++ b/hw/sparc/Kconfig @@ -5,6 +5,7 @@ config SUN4M select CS4231 select ECCMEMCTL select EMPTY_SLOT + select UNIMP select ESCC select ESP select FDC From patchwork Tue Jun 9 07:32:00 2020 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: 1305622 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jqc6021J; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h20P36zqz9sRN for ; Tue, 9 Jun 2020 17:33:09 +1000 (AEST) Received: from localhost ([::1]:46324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYkt-00046r-6I for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:33:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkA-00044a-MW for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:23 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:56311) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYk9-0007WD-5l for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:22 -0400 Received: by mail-wm1-x341.google.com with SMTP id c71so1786273wmd.5 for ; Tue, 09 Jun 2020 00:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QmQet6MF2UoYbap2Zvn3IP+yrgTESYuhDl3I2oxJkS8=; b=jqc6021JAritlIr+jZKVFRcDKIELFg+iNBv3UFkpuN01Tesks+N4FVPlzf+PZ2XgLZ CFRVlE+MRfWbgysJU0TWJ6T+X81IFzoh4xUr9t/NlZbxzd8EEwcSVBnMe9zFaBejzLIe oGDhbrpGlCIeVJyoNG9Oh2eWYPA5lJ6TNAY5G3uYY8Rf0RMXoMzoB0QVK15QM1ikLnrC G3PgGSz0y8IDI9LBNIM2EIeUJVAxDRkAf27fBoC4CGJQOTGp7kA3I1jH1zx0edXuwKtV RXuE54ErDe7ledbRRqqY9AmiUjm+3B/HqUtbKqwBjNzo4Dsud7vURQtBtkQFLa3eKNv4 2bxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=QmQet6MF2UoYbap2Zvn3IP+yrgTESYuhDl3I2oxJkS8=; b=a4nkMTd+8vy/lbK09cSY4ig+v+UgsfnWk9qzSkN+qV5/A/V85v2CdkWorj+UIyZiq1 1gMtrljNvVa8E0HweUZvw7xPMCaJ79Y4Jv3FfzDtuKy+9MDFI7+drWEumHWW0Q8z/4XC 2UAyt6bVuoBDcsG/kE26vHKhjc2N7qols0K6nosQeRqIk7cpLLWRztRT3Y4ekUDx6Gtz fv+YDXJnEOH7Ceb56XkBcvuY2CwwMs8f6qI7eRQKISYviXtAGJbB3EBgg3yuysosnqWZ HTfvjB3H/66livEOCG5+lwZk7dOA7Q8G6vqEK46DuLDFB/JUpXaui/rWsSc1VN6HS2ER Dmqg== X-Gm-Message-State: AOAM532FFoS1WpG8vM5OlMnrfU/mtmW+yZhm+Z6Y06yEmGX0+tD658n3 J75rHt6d3hmSUpq7C+jXDzO33FU2 X-Google-Smtp-Source: ABdhPJxKmgp9GzvJWEFU5rTr46A02LwHNDexMBa+As65EtTKStIkwpOS33e5BZEqhLnDP/gxH/Fx1w== X-Received: by 2002:a1c:a906:: with SMTP id s6mr2698186wme.171.1591687938484; Tue, 09 Jun 2020 00:32:18 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:17 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 02/16] hw/misc/empty_slot: Lower address space priority Date: Tue, 9 Jun 2020 09:32:00 +0200 Message-Id: <20200609073214.14079-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x341.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Empty slots model RAZ/WI access on a bus. Since we can still (hot) plug devices on the bus, lower the slot priority, so device added later is accessed first. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Artyom Tarasenko Message-Id: <20200510152840.13558-3-f4bug@amsat.org> --- hw/core/empty_slot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 3ba450e1ca..5ab426e965 100644 --- a/hw/core/empty_slot.c +++ b/hw/core/empty_slot.c @@ -67,7 +67,7 @@ void empty_slot_init(hwaddr addr, uint64_t slot_size) qdev_init_nofail(dev); - sysbus_mmio_map(s, 0, addr); + sysbus_mmio_map_overlap(s, 0, addr, -10000); } } From patchwork Tue Jun 9 07:32:01 2020 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: 1305624 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=hfMJppeO; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h2131ymRz9sQx for ; Tue, 9 Jun 2020 17:33:43 +1000 (AEST) Received: from localhost ([::1]:49352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYlQ-0005Nd-Ux for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:33:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkB-00044v-DT for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:23 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:33138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkA-0007WI-Ey for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:23 -0400 Received: by mail-wr1-x441.google.com with SMTP id l11so20080763wru.0 for ; Tue, 09 Jun 2020 00:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JSDexJUoRc6C2dBRPfkhG4h1BGjFFYK10Clp3IocDL8=; b=hfMJppeOHfs2XSDo401PBnMmW1ulSegyUL0Gb5YjynL0a1P1H8vRTP3d4ILbeLDZQm nzDykrSiuobROMTrr21CarIvcoOXOPZhltix+P318lUKddh5ugYAdZ4+7/BjuIzjHcom HZcL+IKO0rHmrfhIxVC6hD7XCOIgnRs88JijJAbur2Mj1MYkj4FHBHLvi/GYabdDGgPP oK/IYqSFGRSYZa8w7gfPwiRIdnIpDyudvVjIcAvoaYUDhPcjhLwoJA7inovTphwx2Znt cu9qYUiSP8GqRNbvbhcXiH0sH7DVwJNnqFfwV1a4Zt2KZFTdhhj4+FMItK1ufJEbi9xz 9CiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=JSDexJUoRc6C2dBRPfkhG4h1BGjFFYK10Clp3IocDL8=; b=qT9SDqJp13GHD0Y3G3+W5A53+d10ffyP9BfdpxiqyugqnDh7Ic3xYnavRCnyzpCTA3 MwRXfLENH6CjIAJSWPHuJ6BwU4cSrMIL7tOBwUGM2Pqxl3SN1JksERd5xxAkCEPpxUS5 9vfqJ00NzfgD4YlQZKgiOz2b+gn/DGW9A00Sil5mLbjFhkZ/xW5EddKWiSsRwqzCTo14 jmtA4eN0MlobKtWE5RUugncdJ3KsEUm4VtmImUunWtsMQW34JSaJQAgdT11+Idw2Zxyd NAnSE6+Ae3o7XkUqMzSIhFqHvXWHTYncFmM/z2Q1ulqK2KHI4kiL7LEZUNmsyRGlHtpj /Yag== X-Gm-Message-State: AOAM533ddQ2D/B2F+HhteJPVPGmxKQiFzMInEXJhMXEP4rUn865CgysT pAgJ1Akc5EqcneCfcCgj2PF1F5mO X-Google-Smtp-Source: ABdhPJy/Q+jV+z7FHe3WTmQZ7Z8YN7l/TTZKkWMkeIHxIusFi5cYikfKOP6MHIFHiKXZnVAwWE0LPQ== X-Received: by 2002:adf:e749:: with SMTP id c9mr3113129wrn.25.1591687939666; Tue, 09 Jun 2020 00:32:19 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:19 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 03/16] hw/misc/empty_slot: Convert 'size' field as qdev property Date: Tue, 9 Jun 2020 09:32:01 +0200 Message-Id: <20200609073214.14079-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Acked-by: Artyom Tarasenko Message-Id: <20200510152840.13558-4-f4bug@amsat.org> --- hw/core/empty_slot.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 5ab426e965..0df086fe98 100644 --- a/hw/core/empty_slot.c +++ b/hw/core/empty_slot.c @@ -12,6 +12,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "qemu/module.h" +#include "hw/qdev-properties.h" #include "hw/empty_slot.h" //#define DEBUG_EMPTY_SLOT @@ -57,17 +58,13 @@ void empty_slot_init(hwaddr addr, uint64_t slot_size) if (slot_size > 0) { /* Only empty slots larger than 0 byte need handling. */ DeviceState *dev; - SysBusDevice *s; - EmptySlot *e; dev = qdev_create(NULL, TYPE_EMPTY_SLOT); - s = SYS_BUS_DEVICE(dev); - e = EMPTY_SLOT(dev); - e->size = slot_size; + qdev_prop_set_uint64(dev, "size", slot_size); qdev_init_nofail(dev); - sysbus_mmio_map_overlap(s, 0, addr, -10000); + sysbus_mmio_map_overlap(SYS_BUS_DEVICE(dev), 0, addr, -10000); } } @@ -80,11 +77,17 @@ static void empty_slot_realize(DeviceState *dev, Error **errp) sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem); } +static Property empty_slot_properties[] = { + DEFINE_PROP_UINT64("size", EmptySlot, size, 0), + DEFINE_PROP_END_OF_LIST(), +}; + static void empty_slot_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = empty_slot_realize; + device_class_set_props(dc, empty_slot_properties); } static const TypeInfo empty_slot_info = { From patchwork Tue Jun 9 07:32:02 2020 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: 1305628 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=oeNn1QLx; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h22N6ny1z9sQx for ; Tue, 9 Jun 2020 17:34:52 +1000 (AEST) Received: from localhost ([::1]:54982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYmY-0007dk-Dg for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:34:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkB-00044s-Bi for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:23 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:37466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkA-0007WK-Kw for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:23 -0400 Received: by mail-wr1-x42a.google.com with SMTP id x13so20071241wrv.4 for ; Tue, 09 Jun 2020 00:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ys/xyxuX8fMwGT919bDlpMl+pENH1CXUCrM9T9iwbXw=; b=oeNn1QLxCWPC1oApF8dukZQFJLxTZ043I7lEHsc1mqAgmYh1ujfqS1cCrFDAkYPxNu 4CXMRjt+F8opiMTeQJl65SOnshYTOAdh9ad70bZUY1VlAWgkKviQuVbVZEFNh1auIkzd eEuBZJnGapljPh1EgUXjZoDnboND9kpGN+QiXjG0+t2zSU3SDunqr00cJcKy13F/5X/2 /dfz1SrUwnpF6y5ZkBGEtLUD60N8iiCD1A4MxyA4mqDzFglJuOCFDIVXrxuVNVhQvTCq PiRkXCIcIfmhdpDznyJvnDnr/7aX2GnDiNr9LtT7Nk+0zPzGFN2wwk6QrRTRpGibdKF3 sEWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ys/xyxuX8fMwGT919bDlpMl+pENH1CXUCrM9T9iwbXw=; b=liIqZi2x/u3t3+6weIxP4G5WSBx+vfcw4sHwkt+yNJwaXWUU7jK67YwtQicJmhiG+x ZRVKVxq4kucTIIK5EjmKVvxBSN4Ks96XSlBWRTSViChF4c/r9ti2nbv3VQB9JFm2LTGq zSbQhmy2hI5XlQ4vFGJoos4i/XdnEhP2EXiIjr7156abgCTPclQs7+V2TmUBI1iS8SZB sjs53g0Ny6wnzrvP/9KhzIHWprFXiZFBil1yHQ2bNRoO7Ho9GVSYLkex/LzFnOGhijYV tca8I0zjG8tCtO84UR8WZ2VVR63TJVvsexRLqhcKpQk7yb11B329bWscyA6InpGrTyJT eoCA== X-Gm-Message-State: AOAM5320M51wY8TLxviPGKUrOWySCXJBn/JtUgFxjwusB2wrVXmOxMTj AuT0lPO3Ed70ATGjTnrm95X0wLGU X-Google-Smtp-Source: ABdhPJyocJu4bPvJg8ncPXYqIVmAMfqDx7bMGoMYAxuMVpNzD7NeqSiQ7nPwKCpvD1XkOSUV1hLlSA== X-Received: by 2002:a5d:4490:: with SMTP id j16mr3132758wrq.276.1591687940791; Tue, 09 Jun 2020 00:32:20 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 04/16] hw/misc/empty_slot: Add a 'name' qdev property Date: Tue, 9 Jun 2020 09:32:02 +0200 Message-Id: <20200609073214.14079-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add a 'name' qdev property so when multiple slots are accessed, we can notice which one is accessed. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Artyom Tarasenko Message-Id: <20200510152840.13558-5-f4bug@amsat.org> --- hw/core/empty_slot.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 0df086fe98..576b276c4b 100644 --- a/hw/core/empty_slot.c +++ b/hw/core/empty_slot.c @@ -31,6 +31,7 @@ typedef struct EmptySlot { SysBusDevice parent_obj; MemoryRegion iomem; + char *name; uint64_t size; } EmptySlot; @@ -72,13 +73,17 @@ static void empty_slot_realize(DeviceState *dev, Error **errp) { EmptySlot *s = EMPTY_SLOT(dev); + if (s->name == NULL) { + s->name = g_strdup("empty-slot"); + } memory_region_init_io(&s->iomem, OBJECT(s), &empty_slot_ops, s, - "empty-slot", s->size); + s->name, s->size); sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem); } static Property empty_slot_properties[] = { DEFINE_PROP_UINT64("size", EmptySlot, size, 0), + DEFINE_PROP_STRING("name", EmptySlot, name), DEFINE_PROP_END_OF_LIST(), }; From patchwork Tue Jun 9 07:32:03 2020 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: 1305631 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=QZwx6qET; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h23p1yC3z9sQx for ; Tue, 9 Jun 2020 17:36:06 +1000 (AEST) Received: from localhost ([::1]:57986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYnj-0000Ox-Uv for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:36:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkC-00046V-Di for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:24 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:46052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkB-0007Wd-Ib for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:24 -0400 Received: by mail-wr1-x42f.google.com with SMTP id c3so20036973wru.12 for ; Tue, 09 Jun 2020 00:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=idot/QDNLgKUfkv/Kifwf1j/trErlW/RBMlHKACXiRc=; b=QZwx6qETfdfmbSCN+2wAvaFhzrcVKRUBv815jN/puBVbS/f4vxAbRdUdK0tOqkkAlq daqJAiQgvgL7U1j7bC3yEmM56jtHVc8hhl0h4CSHuew/0mJAlmEnkakMQkyp/tDICSo7 P1kZR0dDrFOkNs3CfsehMM4mYKcu+qRjjL0v6i9SWGMqFyhKzBTCW3aXSWS8a/JDbvVJ FranaQywWzzACMtOWr9dRMVv6V8mHEtAb0NnIZWMj3YHMzkZip5nLMKnyUv24VhMiZCT UG7dDljh1oEYp1z5h8NGFvSM1qsHroMAoRU7enAPS9isFBi+22lfrfyd8WqP5/BQR03I N5jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=idot/QDNLgKUfkv/Kifwf1j/trErlW/RBMlHKACXiRc=; b=ht1cSa2fWL+hPEM7sfD3VTbjCc0l8pIJXSqPGIund7qQJxy+H55jLFqGcAC7ol8ctI JoK56BhwzuoF2tIaET8k1Ln1ByGc/715Hd0QAN4fvpmIp6veDVPtQJvQjzlY2S0imumw /uDlFqGVRWFgm/E5sTxJBdfgBfsHzST9ogU9Kis01AyZO0WM2EqbG+5Pt0iEY6RyiNiD Df62Xdip3kkXNCQMaP1dgOKGbIzefgIo0/MsyYRdMUjUcnpZClFXvVjvG+0/Sj6Ui3Fq jUbS8iLUxnY+gynSSN7uAQpUGlqDXjub3hTky4bIOajgHFpNdu6YAtYHh4kVxs0QedQa CNiA== X-Gm-Message-State: AOAM533WPq2iiQFHQD/xL2lgV7G7c+H+yvR/+WEuVthYR5Irm2VdGFHz lR/vIq0psxH4ZaxFfXC7RwYsQ+sz X-Google-Smtp-Source: ABdhPJwJQwE4R2E7g8IVAZOdrJEj08ziEHbiTwKnbzLe3Lx35icAesQrd8wFOI/cNlyEfUepOdSpTg== X-Received: by 2002:adf:b348:: with SMTP id k8mr3167562wrd.157.1591687941923; Tue, 09 Jun 2020 00:32:21 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:21 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 05/16] hw/misc/empty_slot: Convert debug printf() to trace event Date: Tue, 9 Jun 2020 09:32:03 +0200 Message-Id: <20200609073214.14079-6-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Acked-by: Artyom Tarasenko Message-Id: <20200510152840.13558-6-f4bug@amsat.org> --- hw/core/empty_slot.c | 19 ++++++++----------- hw/core/trace-events | 4 ++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 576b276c4b..d28f7f99c9 100644 --- a/hw/core/empty_slot.c +++ b/hw/core/empty_slot.c @@ -14,15 +14,7 @@ #include "qemu/module.h" #include "hw/qdev-properties.h" #include "hw/empty_slot.h" - -//#define DEBUG_EMPTY_SLOT - -#ifdef DEBUG_EMPTY_SLOT -#define DPRINTF(fmt, ...) \ - do { printf("empty_slot: " fmt , ## __VA_ARGS__); } while (0) -#else -#define DPRINTF(fmt, ...) do {} while (0) -#endif +#include "trace.h" #define TYPE_EMPTY_SLOT "empty_slot" #define EMPTY_SLOT(obj) OBJECT_CHECK(EmptySlot, (obj), TYPE_EMPTY_SLOT) @@ -38,14 +30,19 @@ typedef struct EmptySlot { static uint64_t empty_slot_read(void *opaque, hwaddr addr, unsigned size) { - DPRINTF("read from " TARGET_FMT_plx "\n", addr); + EmptySlot *s = EMPTY_SLOT(opaque); + + trace_empty_slot_write(addr, size << 1, 0, size, s->name); + return 0; } static void empty_slot_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { - DPRINTF("write 0x%x to " TARGET_FMT_plx "\n", (unsigned)val, addr); + EmptySlot *s = EMPTY_SLOT(opaque); + + trace_empty_slot_write(addr, size << 1, val, size, s->name); } static const MemoryRegionOps empty_slot_ops = { diff --git a/hw/core/trace-events b/hw/core/trace-events index 1ac60ede6b..bbb68fb6f0 100644 --- a/hw/core/trace-events +++ b/hw/core/trace-events @@ -34,3 +34,7 @@ clock_disconnect(const char *clk) "'%s'" clock_set(const char *clk, uint64_t old, uint64_t new) "'%s', ns=%"PRIu64"->%"PRIu64 clock_propagate(const char *clk) "'%s'" clock_update(const char *clk, const char *src, uint64_t val, int cb) "'%s', src='%s', ns=%"PRIu64", cb=%d" + +# empty_slot.c +empty_slot_read(uint64_t addr, unsigned width, uint64_t value, unsigned size, const char *name) "rd addr:0x%04"PRIx64" data:0x%0*"PRIx64" size %u [%s]" +empty_slot_write(uint64_t addr, unsigned width, uint64_t value, unsigned size, const char *name) "wr addr:0x%04"PRIx64" data:0x%0*"PRIx64" size %u [%s]" From patchwork Tue Jun 9 07:32:04 2020 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: 1305630 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=MqQUMTrP; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h23g2vc1z9sT6 for ; Tue, 9 Jun 2020 17:35:59 +1000 (AEST) Received: from localhost ([::1]:57670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYnd-0000GO-2e for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:35:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkD-000478-O0 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:26 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:43316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkC-0007Wu-Qp for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:25 -0400 Received: by mail-wr1-x432.google.com with SMTP id l10so20054054wrr.10 for ; Tue, 09 Jun 2020 00:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SlkPl6cNOYs8vWt7/HaIVNoEzcGik+jCQKxQU11fHF0=; b=MqQUMTrPHQz5Txx1o8EskLvAcSENSXgFKBf+fEHOJjsLFv6Anf2lZMtt7KRQ+vNWwA yzcsUQGm5f0bAemuzDnmA0FDPTes7+wI4or1hlxAFkkrnJCTbfGCy/Z/4YMqPVkzaZE1 LLx6zjkCFnuNrkq6w3PUsY2Xlv/zNlDkW9OmmXxttPB+576PbspA7cJscSlp+OBMBIQs HC+xL5x65HjVitBWttd3b02v7ce9M4D4gBfkBwEVw+6el8fAkjZvvUCK/j7AifOSBv+O K6elWAUxcyJ1htwUE2RY+aKw+sczqx/aF8QiuqkNjjcTb2ABbfeFP2dF5jP/Vkg3YCp1 viWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SlkPl6cNOYs8vWt7/HaIVNoEzcGik+jCQKxQU11fHF0=; b=UaP9gwt3DW2VqjVakZGIfCzwXUGxjrtXO2ZeeYIHhMRpLqLsQAqNWOOqFG6IsW/4WW 0iOeMT4DxJTvj/i09mlsn459nXb/OY0Dbcut9sEttN6JH46JRAfioOxgSE2oiTKHzGeR e8/B9ZHnuudNkHAEMzo5H23VgQK4ybj9r27Gh3YXw6az3AZKyHtZnBOTWlrW8ideG0bb t3vY8i/3ETuaP/SPpUPU0ZsSgZjxQXft796JB9eWjHINpx6/2cSyakCVTV6YOqIDa19A XVMkfbMYzOjpOQPtm7UA/wCVifk/clhdG5TMTrNUsIjhrv/Eol2jA7fB6QVHAZJrsF3G WRgA== X-Gm-Message-State: AOAM533n89i4gYDDUrCGoEJJJLqCLVu+tYQ08XpAKxGCYSTYcTTCKf98 H9/7WeYdMSbg0EWf+67OW/lqCXfR X-Google-Smtp-Source: ABdhPJzW5LmaDIN6qSinzHcDg+sapUfsuyjxaOsRHeglo5azO6WXg5UgGRyQ2KCqKJJcEO+rFmX69w== X-Received: by 2002:adf:f988:: with SMTP id f8mr3120462wrr.81.1591687943032; Tue, 09 Jun 2020 00:32:23 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 06/16] hw/misc/empty_slot: Move the 'hw/misc' and cover in MAINTAINERS Date: Tue, 9 Jun 2020 09:32:04 +0200 Message-Id: <20200609073214.14079-7-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x432.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add an entry for the 'empty_slot' device. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Artyom Tarasenko Message-Id: <20200510152840.13558-7-f4bug@amsat.org> --- include/hw/empty_slot.h | 9 --------- include/hw/misc/empty_slot.h | 19 +++++++++++++++++++ hw/mips/malta.c | 2 +- hw/{core => misc}/empty_slot.c | 4 ++-- hw/sparc/sun4m.c | 2 +- MAINTAINERS | 7 +++++++ hw/core/Makefile.objs | 1 - hw/core/trace-events | 4 ---- hw/misc/Makefile.objs | 1 + hw/misc/trace-events | 4 ++++ 10 files changed, 35 insertions(+), 18 deletions(-) delete mode 100644 include/hw/empty_slot.h create mode 100644 include/hw/misc/empty_slot.h rename hw/{core => misc}/empty_slot.c (96%) diff --git a/include/hw/empty_slot.h b/include/hw/empty_slot.h deleted file mode 100644 index cb9a221aa6..0000000000 --- a/include/hw/empty_slot.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef HW_EMPTY_SLOT_H -#define HW_EMPTY_SLOT_H - -#include "exec/hwaddr.h" - -/* empty_slot.c */ -void empty_slot_init(hwaddr addr, uint64_t slot_size); - -#endif diff --git a/include/hw/misc/empty_slot.h b/include/hw/misc/empty_slot.h new file mode 100644 index 0000000000..b023bc2d91 --- /dev/null +++ b/include/hw/misc/empty_slot.h @@ -0,0 +1,19 @@ +/* + * QEMU Empty Slot + * + * The empty_slot device emulates known to a bus but not connected devices. + * + * Copyright (c) 2010 Artyom Tarasenko + * + * This code is licensed under the GNU GPL v2 or (at your option) any later + * version. + */ + +#ifndef HW_EMPTY_SLOT_H +#define HW_EMPTY_SLOT_H + +#include "exec/hwaddr.h" + +void empty_slot_init(hwaddr addr, uint64_t slot_size); + +#endif diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 636c95d1fe..c973c76b2a 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -52,7 +52,7 @@ #include "sysemu/runstate.h" #include "qapi/error.h" #include "qemu/error-report.h" -#include "hw/empty_slot.h" +#include "hw/misc/empty_slot.h" #include "sysemu/kvm.h" #include "hw/semihosting/semihost.h" #include "hw/mips/cps.h" diff --git a/hw/core/empty_slot.c b/hw/misc/empty_slot.c similarity index 96% rename from hw/core/empty_slot.c rename to hw/misc/empty_slot.c index d28f7f99c9..54be085189 100644 --- a/hw/core/empty_slot.c +++ b/hw/misc/empty_slot.c @@ -11,9 +11,8 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "qemu/module.h" #include "hw/qdev-properties.h" -#include "hw/empty_slot.h" +#include "hw/misc/empty_slot.h" #include "trace.h" #define TYPE_EMPTY_SLOT "empty_slot" @@ -90,6 +89,7 @@ static void empty_slot_class_init(ObjectClass *klass, void *data) dc->realize = empty_slot_realize; device_class_set_props(dc, empty_slot_properties); + set_bit(DEVICE_CATEGORY_MISC, dc->categories); } static const TypeInfo empty_slot_info = { diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index fa3dd7775f..a16e667bee 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -46,7 +46,7 @@ #include "hw/nvram/chrp_nvram.h" #include "hw/nvram/fw_cfg.h" #include "hw/char/escc.h" -#include "hw/empty_slot.h" +#include "hw/misc/empty_slot.h" #include "hw/misc/unimp.h" #include "hw/irq.h" #include "hw/loader.h" diff --git a/MAINTAINERS b/MAINTAINERS index 6e7890ce82..3abe3faa4e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1864,6 +1864,13 @@ S: Maintained F: include/hw/misc/unimp.h F: hw/misc/unimp.c +Empty slot +M: Artyom Tarasenko +R: Philippe Mathieu-Daudé +S: Maintained +F: include/hw/misc/empty_slot.h +F: hw/misc/empty_slot.c + Standard VGA M: Gerd Hoffmann S: Maintained diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs index 1d540ed6e7..d8fee8effe 100644 --- a/hw/core/Makefile.objs +++ b/hw/core/Makefile.objs @@ -24,7 +24,6 @@ common-obj-$(CONFIG_SOFTMMU) += numa.o common-obj-$(CONFIG_SOFTMMU) += clock-vmstate.o obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o -common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o common-obj-$(CONFIG_XILINX_AXI) += stream.o common-obj-$(CONFIG_PTIMER) += ptimer.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o diff --git a/hw/core/trace-events b/hw/core/trace-events index bbb68fb6f0..1ac60ede6b 100644 --- a/hw/core/trace-events +++ b/hw/core/trace-events @@ -34,7 +34,3 @@ clock_disconnect(const char *clk) "'%s'" clock_set(const char *clk, uint64_t old, uint64_t new) "'%s', ns=%"PRIu64"->%"PRIu64 clock_propagate(const char *clk) "'%s'" clock_update(const char *clk, const char *src, uint64_t val, int cb) "'%s', src='%s', ns=%"PRIu64", cb=%d" - -# empty_slot.c -empty_slot_read(uint64_t addr, unsigned width, uint64_t value, unsigned size, const char *name) "rd addr:0x%04"PRIx64" data:0x%0*"PRIx64" size %u [%s]" -empty_slot_write(uint64_t addr, unsigned width, uint64_t value, unsigned size, const char *name) "wr addr:0x%04"PRIx64" data:0x%0*"PRIx64" size %u [%s]" diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs index 60a9d80b74..5aaca8a039 100644 --- a/hw/misc/Makefile.objs +++ b/hw/misc/Makefile.objs @@ -10,6 +10,7 @@ common-obj-$(CONFIG_EDU) += edu.o common-obj-$(CONFIG_PCA9552) += pca9552.o common-obj-$(CONFIG_UNIMP) += unimp.o +common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o common-obj-$(CONFIG_FW_CFG_DMA) += vmcoreinfo.o # ARM devices diff --git a/hw/misc/trace-events b/hw/misc/trace-events index a5862b2bed..0cb4c64ae7 100644 --- a/hw/misc/trace-events +++ b/hw/misc/trace-events @@ -39,6 +39,10 @@ ecc_mem_readl_ecr1(uint32_t ret) "Read event count 2 0x%08x" ecc_diag_mem_writeb(uint64_t addr, uint32_t val) "Write diagnostic %"PRId64" = 0x%02x" ecc_diag_mem_readb(uint64_t addr, uint32_t ret) "Read diagnostic %"PRId64"= 0x%02x" +# empty_slot.c +empty_slot_read(uint64_t addr, unsigned width, uint64_t value, unsigned size, const char *name) "rd addr:0x%04"PRIx64" data:0x%0*"PRIx64" size %u [%s]" +empty_slot_write(uint64_t addr, unsigned width, uint64_t value, unsigned size, const char *name) "wr addr:0x%04"PRIx64" data:0x%0*"PRIx64" size %u [%s]" + # slavio_misc.c slavio_misc_update_irq_raise(void) "Raise IRQ" slavio_misc_update_irq_lower(void) "Lower IRQ" From patchwork Tue Jun 9 07:32:05 2020 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: 1305638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OkkIasPx; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h28b1WX0z9sQx for ; Tue, 9 Jun 2020 17:40:15 +1000 (AEST) Received: from localhost ([::1]:45386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYrk-0006up-QJ for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:40:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkE-00047a-P1 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:27 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:44761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkE-0007X4-0T for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:26 -0400 Received: by mail-wr1-x444.google.com with SMTP id y17so20042419wrn.11 for ; Tue, 09 Jun 2020 00:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7SiSsVqqUtOR4NW9TEB36YXYjOxJiCE5fvC4CDj0Z7M=; b=OkkIasPxUwE1Fr++rG+KrYibi+e+Su1wqh88cWuquIusPPTMw112BDDjOS47EdUBAB Cd/xnjAJflUyYAl5IKP7OT/D+t/0uyhwtiQ3hEa8rQkSruavCioS91kB1xeLd2wP2vS5 VSKSrJX+ilNhtSTN1R1XS88gzJgavyl4xthp842L70QyPw84IbvONgAjdS21ESnElo5M LYcONH0SvwBz18x9xSNlFAftTvi+2rH0KN/ZGQJCWDC7pyAZev1u3fQgFlEJR/KoZLZv pdN4KLbye0yR0optY2hxJlGw2fz/FzocbqzQtKCch6WEMwmcrsjSYGLjJGVH8Axj+NdN UgRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7SiSsVqqUtOR4NW9TEB36YXYjOxJiCE5fvC4CDj0Z7M=; b=IGAZsMul7IRVhTlgwYun8V0CFHPZn3EgyE8YaNbsQtG373Mg56mNMDtdfb+9/w/bYy Hi8kMy++tEPMR0VQ8S8ycB9b8m/67lJFzzkQFvi4k/tS+mI22oUi8JWNMZLFmlxn/CMv ZnWqebe+38yuPVq3gZJX60fwVwRUhRUmPiLT6nRQjTM07oSPaQxYqsNVPl/tnPP1DrCh nZRXHZ98GiVhK+H9rgsLwbXdqVSk5H/GfM3HkBw23tp8OeMtrZydyiXj1i5pbDL+E+Fx L3V0EmriyRHvNF0YI/gJ9utz7Y819xKu+t1K3Jl1s9LV7QkzyGK+S0URuavwm8XvntSS N4Qg== X-Gm-Message-State: AOAM530m2uLHo6t1wckDgB2Gvq4CHlnw6OTjLZgoAuzHRDryK5IU/TNZ F92np5OnEhW9ma5/hJzkPO/Tg1q3 X-Google-Smtp-Source: ABdhPJyMzIv1YTU/vR52wY5ROwsN/rjadEnOpJTbZUo//y4GSjsC1RFZfnhL2bFNtk0MIwk7bpzUoQ== X-Received: by 2002:a5d:4042:: with SMTP id w2mr2989322wrp.423.1591687944359; Tue, 09 Jun 2020 00:32:24 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 07/16] hw/misc/empty_slot: Name the slots when created Date: Tue, 9 Jun 2020 09:32:05 +0200 Message-Id: <20200609073214.14079-8-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Directly set the slot name when creating the device, to display the device name in trace events. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Artyom Tarasenko Message-Id: <20200510152840.13558-8-f4bug@amsat.org> --- include/hw/misc/empty_slot.h | 2 +- hw/mips/malta.c | 2 +- hw/misc/empty_slot.c | 2 +- hw/sparc/sun4m.c | 10 +++++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/hw/misc/empty_slot.h b/include/hw/misc/empty_slot.h index b023bc2d91..dec56e56ae 100644 --- a/include/hw/misc/empty_slot.h +++ b/include/hw/misc/empty_slot.h @@ -14,6 +14,6 @@ #include "exec/hwaddr.h" -void empty_slot_init(hwaddr addr, uint64_t slot_size); +void empty_slot_init(const char *name, hwaddr addr, uint64_t slot_size); #endif diff --git a/hw/mips/malta.c b/hw/mips/malta.c index c973c76b2a..62063b2305 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -1241,7 +1241,7 @@ void mips_malta_init(MachineState *machine) * exception when accessing invalid memory. Create an empty slot to * emulate this feature. */ - empty_slot_init(0, 0x20000000); + empty_slot_init("GT64120", 0, 0x20000000); qdev_init_nofail(dev); diff --git a/hw/misc/empty_slot.c b/hw/misc/empty_slot.c index 54be085189..b568ae202b 100644 --- a/hw/misc/empty_slot.c +++ b/hw/misc/empty_slot.c @@ -50,7 +50,7 @@ static const MemoryRegionOps empty_slot_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -void empty_slot_init(hwaddr addr, uint64_t slot_size) +void empty_slot_init(const char *name, hwaddr addr, uint64_t slot_size) { if (slot_size > 0) { /* Only empty slots larger than 0 byte need handling. */ diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index a16e667bee..249f7ba7ea 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -884,7 +884,8 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, /* models without ECC don't trap when missing ram is accessed */ if (!hwdef->ecc_base) { - empty_slot_init(machine->ram_size, hwdef->max_mem - machine->ram_size); + empty_slot_init("ecc", machine->ram_size, + hwdef->max_mem - machine->ram_size); } prom_init(hwdef->slavio_base, bios_name); @@ -915,7 +916,8 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, Software shouldn't use aliased addresses, neither should it crash when does. Using empty_slot instead of aliasing can help with debugging such accesses */ - empty_slot_init(hwdef->iommu_pad_base,hwdef->iommu_pad_len); + empty_slot_init("iommu.alias", + hwdef->iommu_pad_base, hwdef->iommu_pad_len); } sparc32_dma_init(hwdef->dma_base, @@ -964,7 +966,9 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, for (i = 0; i < MAX_VSIMMS; i++) { /* vsimm registers probed by OBP */ if (hwdef->vsimm[i].reg_base) { - empty_slot_init(hwdef->vsimm[i].reg_base, 0x2000); + char *name = g_strdup_printf("vsimm[%d]", i); + empty_slot_init(name, hwdef->vsimm[i].reg_base, 0x2000); + g_free(name); } } From patchwork Tue Jun 9 07:32:06 2020 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: 1305636 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=CPYkQZGQ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h26h4n86z9sQx for ; Tue, 9 Jun 2020 17:38:36 +1000 (AEST) Received: from localhost ([::1]:38286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYqA-00041p-De for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:38:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkG-00047l-2U for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:28 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:33139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkF-0007XD-Ao for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:27 -0400 Received: by mail-wr1-x441.google.com with SMTP id l11so20081038wru.0 for ; Tue, 09 Jun 2020 00:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eos1WJYtuH+j1S1wUpCIWosKP33E+t99Sgm1VOZwc6c=; b=CPYkQZGQj7J+btW5HYGhY0jUEJyiIabxf4hgCcCEtoWcv8s1i4XAFYKBtZBYjngbKy 38B8K7MF78ayml029JnH1uzqxeTIaTPic3COCCZnCDlkLHFml73r3XhczuIUw5h2FsUS WXVXTwebPSgpmDqb8Bg0xY5jvEeOxZFDHRL+ICZJPdY5szPbJFpJfDGe70BNJI/JwNoo LBbL+6uoD7R3en/wnCur3vmvv4qlxwVv9jI6DzkI4rTLkw7bqxhQMiZ3C7Vp3Mlhz4dx QzkTnKfCLRcqHq6y8Kxig2SlhTex2aF7C2JgPNcThOUsRbiSJiR/6S2iRA9f3C0/LqMF 2aTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=eos1WJYtuH+j1S1wUpCIWosKP33E+t99Sgm1VOZwc6c=; b=ZvY2UZUs6b19BqCaJYnUbLxwD33V6/lShiHcHa50Luy5m9sdSk9K+bKH+bdByzNYCb rbpuHOrSkE0Y8uzl1a/9uSeDk+pG64l5fOxQtuMQu1ZyDfbBYk7vCvs0c7Iq7VRMVSht 7hzvMZpfvGBtujoaXR21VsVI0T4qO8PmaKv+cQ+5qUCVRZYHWs2s+nRq9M1liWh65rff gpBrrmUb51Rn0RM/0wVua4zKhZ5W5G0xQqNt01irn0eCx0nBTK93538BkjlEWzVqr8D/ 42wI25YLrSRHr3oiguXAD38oCO3eED2Kskosg0rfkAYggRKYRE0VuXnhKH8tj1rvrfu6 1A+Q== X-Gm-Message-State: AOAM531c/liOhr0kU4WriXRYECCx1iehSYJydAJ+0tmvBRIeEiPP+GhX 6cbkhxJ3IGWSXGxvY/Q8njin+usM X-Google-Smtp-Source: ABdhPJxWBes8rekotyittBo4qWr+y1X+ByU0YTWgGM7wWCofXWIMWCdKTUsSmVFhKMksdm5n1FUHxA== X-Received: by 2002:a5d:61d0:: with SMTP id q16mr3045561wrv.182.1591687945500; Tue, 09 Jun 2020 00:32:25 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:24 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 08/16] hw/sparc/leon3: Map the UART device unconditionally Date: Tue, 9 Jun 2020 09:32:06 +0200 Message-Id: <20200609073214.14079-9-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The UART is present on the chipset regardless there is a character device connected to it. Map it unconditionally. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Artyom Tarasenko Reviewed-by: KONRAD Frederic Message-Id: <20200608172144.20461-2-f4bug@amsat.org> --- hw/sparc/leon3.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 8f024dab7b..cc55117dec 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -339,16 +339,14 @@ static void leon3_generic_hw_init(MachineState *machine) 0, LEON3_TIMER_IRQ, GRLIB_APBIO_AREA); /* Allocate uart */ - if (serial_hd(0)) { - dev = qdev_create(NULL, TYPE_GRLIB_APB_UART); - qdev_prop_set_chr(dev, "chrdev", serial_hd(0)); - qdev_init_nofail(dev); - sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, LEON3_UART_OFFSET); - sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irqs[LEON3_UART_IRQ]); - grlib_apb_pnp_add_entry(apb_pnp, LEON3_UART_OFFSET, 0xFFF, - GRLIB_VENDOR_GAISLER, GRLIB_APBUART_DEV, 1, - LEON3_UART_IRQ, GRLIB_APBIO_AREA); - } + dev = qdev_create(NULL, TYPE_GRLIB_APB_UART); + qdev_prop_set_chr(dev, "chrdev", serial_hd(0)); + qdev_init_nofail(dev); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, LEON3_UART_OFFSET); + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irqs[LEON3_UART_IRQ]); + grlib_apb_pnp_add_entry(apb_pnp, LEON3_UART_OFFSET, 0xFFF, + GRLIB_VENDOR_GAISLER, GRLIB_APBUART_DEV, 1, + LEON3_UART_IRQ, GRLIB_APBIO_AREA); } static void leon3_generic_machine_init(MachineClass *mc) From patchwork Tue Jun 9 07:32:07 2020 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: 1305644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=vFbheXaj; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h2B91VQlz9sQx for ; Tue, 9 Jun 2020 17:41:37 +1000 (AEST) Received: from localhost ([::1]:51108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYt4-0000yO-UP for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:41:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkK-00049W-DR for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:32 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:40390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkG-0007XM-7q for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:28 -0400 Received: by mail-wr1-x441.google.com with SMTP id h5so20074648wrc.7 for ; Tue, 09 Jun 2020 00:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tdQA57lBeQOvfXchna8N/D8Nyo98nJ4cAaaQhD8ORsY=; b=vFbheXajUu3sgB8XRH5I1gdvhMlo45aUS6lYEAEMj2oV5YCkTmn3ywN3Z1TkklURiH 2La1hJ+pglcsmC/8BRJBSUPnk3k/EUcOdPMRWLA9ev5lCDcHe8Dz+8WIMN3Eu1F8XrYB sUL+PugTmnW1ltu3HG8CXAFxhgsM6B8rbckePxW/AYNmPTwlFbCH8EKfxz67d21c5sTN 5ofN98W/NH+jZgAW3qr6djfq0MfImOuA7XcGoECBy+GQHbyg3KPvTbUKiOcmeDnrtSJb 0WL7oB4uCxgQJW1u3yNjxqOTC9tF4h88BvsBpKQignbavfpfgM9Djh/7mPgekE4F6IPj wI5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=tdQA57lBeQOvfXchna8N/D8Nyo98nJ4cAaaQhD8ORsY=; b=trWbVBuqRlEtCNqBBYBdeT2hCPiQv5IWH7wSkzzwwgQ92yF5VUXLSNpcHlFqymQPoQ tp2W0Yg/ygA7pSqI6r6wrJq3m1nqVtjKj0/RemF6u6q84mzuiVGB2/DRgIf4pJei0uye 5a779lZz/p5vsXRpDzzLmcjkRbDpOUR+g3HBBfgyeXiTI8dNZgdaDli4PrTii8pEyNnj ZYF/a8MrmSO+wYYF/hYqW+K9UK2rE/4Lyxlf/t+88dc3hpeWf7j/+9xJdGVrqbMqNeXS L7ADm/zGqjhgx8OBKGuz0ZEQ+FR6yKEWYeAjgOItoxip5qHOpXR9/RgHzADGsXHkVSTX xO2A== X-Gm-Message-State: AOAM531ICdMzm1Cjef6eZmcEFmLUVdsStQyJZSA0AZq9pPxYYGrONcGI 8M0nqRvkUsHu9Ggxr9OyEE376yAn X-Google-Smtp-Source: ABdhPJx9ZgRmV+P4rgQIOQvbsA6BXsriqLApJ2rVxWsdNn19aDMpRpJ5YkN5A27oPODJ80nNI1TcKA== X-Received: by 2002:a5d:6087:: with SMTP id w7mr3168891wrt.158.1591687946702; Tue, 09 Jun 2020 00:32:26 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 09/16] hw/sparc64/niagara: Map the UART device unconditionally Date: Tue, 9 Jun 2020 09:32:07 +0200 Message-Id: <20200609073214.14079-10-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The UART is present on the machine regardless there is a character device connected to it. Map it unconditionally. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Artyom Tarasenko Message-Id: <20200608172144.20461-4-f4bug@amsat.org> --- hw/sparc64/niagara.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c index ab5ef8c5b3..148a26890e 100644 --- a/hw/sparc64/niagara.c +++ b/hw/sparc64/niagara.c @@ -152,10 +152,8 @@ static void niagara_init(MachineState *machine) exit(1); } } - if (serial_hd(0)) { - serial_mm_init(sysmem, NIAGARA_UART_BASE, 0, NULL, 115200, - serial_hd(0), DEVICE_BIG_ENDIAN); - } + serial_mm_init(sysmem, NIAGARA_UART_BASE, 0, NULL, + 115200, serial_hd(0), DEVICE_BIG_ENDIAN); create_unimplemented_device("sun4v-iob", NIAGARA_IOBBASE, NIAGARA_IOBSIZE); sun4v_rtc_init(NIAGARA_RTC_BASE); } From patchwork Tue Jun 9 07:32:08 2020 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: 1305635 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=cfHMa+XC; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h26Z0lJsz9sQx for ; Tue, 9 Jun 2020 17:38:29 +1000 (AEST) Received: from localhost ([::1]:37966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYq3-0003u5-Bq for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:38:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkK-0004Av-W5 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:33 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:33140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkK-0007XV-3h for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:32 -0400 Received: by mail-wr1-x442.google.com with SMTP id l11so20081122wru.0 for ; Tue, 09 Jun 2020 00:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/Jz4ECzvOcsIpQrlcWrLyo2Cu8aSLRX7Wv/hnluuwCM=; b=cfHMa+XCq4yxOM5uaezQJ46d3vRT1x/j0bia7QZ96klt1hpDndFiaoLrJyiJa2Fe+R eL15G8m3RGpPJOljYl4TS4Snzp+tOd0u/pWWj1REU0rvlvR7RVqYQr714YS+qsCuPQ+Q h9g7UwJe+zUyHz8XaIx7U77KYv+sJuyxXrZGmXa7JBEBJdgzt8reTrdJcjk+tMJoGAc8 GSdtBG14NTdqGpUUR/sVdOY6GnHzBr0LFFAdW8awTlX4QJpzPrViuMY3stQntMynuJwO 9MBRowvSOQKO4J5Bk3pywH24hfzOf75x1sME75lPyoYePvrRlRj+gAsIMk4ju5NOhUg9 wxrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/Jz4ECzvOcsIpQrlcWrLyo2Cu8aSLRX7Wv/hnluuwCM=; b=oKRUTDCTsh/HyDjLraipIgZfBGFajHlD8643BxLK8F131+AfklDHL9IZtfNAoZbScF vMRxQ9saURbOGdLFQSrE46NFMPfRZwotPHkUoH2XARHlbzIGZVQ0CetEZOkUWIjsBDgd Xev7xBzsAJHhLXlwl9ChjpqDv2tkRHgppdKpq/60cOIP7dWzEP8cmlwPbeXzOnsl5+WN gb5eV+dlVpOXNv6SnuBaQE+Nriruy0vBywtNvsaEDRg5w3yNBNktNQ1helSijXO8yqxh JYlYx3/PgeeDTpYSjHcCPLCeBUhLc4ufYYf/UaF2JvwKx5oYKsGgSRGPHxHHhIfFe3Ho tYJA== X-Gm-Message-State: AOAM531peMqBYlFw3YUoqkrPD4EtinghDIrY/XodZSCrjsFbDOGHHZ0O PE9fHtOb5e2B3jBztupjPgleuGzU X-Google-Smtp-Source: ABdhPJyn9n2ZFPzhj/Ltc9sby+foN5c8cj8On8PEi/PxDiQHH5jDHhxLDsACJRes8iOvt2Em6zkvOw== X-Received: by 2002:adf:82c9:: with SMTP id 67mr3112295wrc.149.1591687947854; Tue, 09 Jun 2020 00:32:27 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 10/16] hw/sparc64/niagara: Remove duplicated NIAGARA_UART_BASE definition Date: Tue, 9 Jun 2020 09:32:08 +0200 Message-Id: <20200609073214.14079-11-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" NIAGARA_UART_BASE is already defined few lines earlier. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Artyom Tarasenko Message-Id: <20200608172144.20461-3-f4bug@amsat.org> --- hw/sparc64/niagara.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c index 148a26890e..a87d55f6bb 100644 --- a/hw/sparc64/niagara.c +++ b/hw/sparc64/niagara.c @@ -68,7 +68,6 @@ typedef struct NiagaraBoardState { #define NIAGARA_VDISK_BASE 0x1f40000000ULL #define NIAGARA_RTC_BASE 0xfff0c1fff8ULL -#define NIAGARA_UART_BASE 0x1f10000000ULL /* Firmware layout * From patchwork Tue Jun 9 07:32:09 2020 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: 1305648 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=cuT6QXJW; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h2Cp0Wskz9sRN for ; Tue, 9 Jun 2020 17:43:02 +1000 (AEST) Received: from localhost ([::1]:55412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYuQ-0002ji-RW for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:42:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkL-0004CO-MT for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:33 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:33142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkK-0007XZ-7d for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:33 -0400 Received: by mail-wr1-x444.google.com with SMTP id l11so20081208wru.0 for ; Tue, 09 Jun 2020 00:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b/OykygRwVllcM0LU21qFqXRkh6UcxIdIvocNlUkuAY=; b=cuT6QXJW/6joXiohF2Sw6YX+QAfTtElydWkOJSe1a/S2X8hjxzSdsbNXxAWMxC1KTl jWXBHz9u55n/yvvlD0mT+bm9eN2JR71GUXLksjcCoUFCsmWo7TtUEH0DqqyelWPJ+T41 3bR7zIjYgXYdCDTQgsVkvF5ZuycHSo6gpDADq04MvCGulyD1sEnFFNxgfkDH0JHoIRNC A3zmc9LHNvFaoiw3peXeElX527jLFkewOTr5QUdMKEvAfjSLjNshpcpSAoIzHepyKtcF BpHoI+xYbJfMszMITcNXX88nhUXdMFJ/PoB/wWAryWhxno3xoyqDSomg/VCLNoPcFm8f ce+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=b/OykygRwVllcM0LU21qFqXRkh6UcxIdIvocNlUkuAY=; b=QFgpV1QzxxnQzIXDFKIH/JHr9SfoenMBziPEDKbr8FT5TxsQs5jdPYsjbr9k6VxMn8 gWL02KZFhiW+Ef7ZseSjQMx2D7OypcNsSoCOO7zdyaZ94qGQkqNWiY063G6z4PcrjinZ jjypEKUJgBRHs7LE77+IDJY0EyqjL+Xn06sTQdXfC+CGXJh80xeDdWkj5cCZkkBA0cg0 OcZe7ZY973PIGg4AKXG12gsrz1upW5rdgGuK8pWtvJvV174XqqKDomjCx7IuxWA1qsWI I+rJrIKI0EBZus+viB442fKerHRH2D4UcUi2odBm0ylE3zVHBZgSTywgFU2LNdoryMAQ 5aZg== X-Gm-Message-State: AOAM531tigauV7EGgXOZ5vu+jVx1dO05K4lE/TUsQoUltjPea/UHiyeI Km8ue4omRz+wOUUXkPxB0tYNS7Yu X-Google-Smtp-Source: ABdhPJz2cRcrqVNjGsSLegGPr13tfJFLf3miJ2jXbQu05nDiTP8R0wqltM1RlLLphxiyPglltSrxmw== X-Received: by 2002:adf:a350:: with SMTP id d16mr2977293wrb.237.1591687949040; Tue, 09 Jun 2020 00:32:29 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 11/16] hw/misc/grlib_ahb_apb_pnp: Avoid crash when writing to AHB PnP registers Date: Tue, 9 Jun 2020 09:32:09 +0200 Message-Id: <20200609073214.14079-12-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Similarly to commit 158b659451 with the APB PnP registers, guests can crash QEMU when writting to the AHB PnP registers: $ echo 'writeb 0xfffff042 69' | qemu-system-sparc -M leon3_generic -S -bios /etc/magic -qtest stdio [I 1571938309.932255] OPENED [R +0.063474] writeb 0xfffff042 69 Segmentation fault (core dumped) (gdb) bt #0 0x0000000000000000 in () #1 0x0000562999110df4 in memory_region_write_with_attrs_accessor (mr=mr@entry=0x56299aa28ea0, addr=66, value=value@entry=0x7fff6abe13b8, size=size@entry=1, shift=, mask=mask@entry=255, attrs=...) at memory.c:503 #2 0x000056299911095e in access_with_adjusted_size (addr=addr@entry=66, value=value@entry=0x7fff6abe13b8, size=size@entry=1, access_size_min=, access_size_max=, access_fn=access_fn@entry= 0x562999110d70 , mr=0x56299aa28ea0, attrs=...) at memory.c:539 #3 0x0000562999114fba in memory_region_dispatch_write (mr=mr@entry=0x56299aa28ea0, addr=66, data=, op=, attrs=attrs@entry=...) at memory.c:1482 #4 0x00005629990c0860 in flatview_write_continue (fv=fv@entry=0x56299aa7d8a0, addr=addr@entry=4294963266, attrs=..., ptr=ptr@entry=0x7fff6abe1540, len=len@entry=1, addr1=, l=, mr=0x56299aa28ea0) at include/qemu/host-utils.h:164 #5 0x00005629990c0a76 in flatview_write (fv=0x56299aa7d8a0, addr=4294963266, attrs=..., buf=0x7fff6abe1540, len=1) at exec.c:3165 #6 0x00005629990c4c1b in address_space_write (as=, addr=, attrs=..., attrs@entry=..., buf=buf@entry=0x7fff6abe1540, len=len@entry=1) at exec.c:3256 #7 0x000056299910f807 in qtest_process_command (chr=chr@entry=0x5629995ee920 , words=words@entry=0x56299acfcfa0) at qtest.c:437 Instead of crashing, log the access as unimplemented. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: KONRAD Frederic Message-Id: <20200331105048.27989-3-f4bug@amsat.org> --- hw/misc/grlib_ahb_apb_pnp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/misc/grlib_ahb_apb_pnp.c b/hw/misc/grlib_ahb_apb_pnp.c index e230e25363..72a8764776 100644 --- a/hw/misc/grlib_ahb_apb_pnp.c +++ b/hw/misc/grlib_ahb_apb_pnp.c @@ -136,8 +136,15 @@ static uint64_t grlib_ahb_pnp_read(void *opaque, hwaddr offset, unsigned size) return ahb_pnp->regs[offset >> 2]; } +static void grlib_ahb_pnp_write(void *opaque, hwaddr addr, + uint64_t val, unsigned size) +{ + qemu_log_mask(LOG_UNIMP, "%s not implemented\n", __func__); +} + static const MemoryRegionOps grlib_ahb_pnp_ops = { .read = grlib_ahb_pnp_read, + .write = grlib_ahb_pnp_write, .endianness = DEVICE_BIG_ENDIAN, }; From patchwork Tue Jun 9 07:32:10 2020 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: 1305639 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=t3HhdleI; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h28d2MZPz9sQx for ; Tue, 9 Jun 2020 17:40:17 +1000 (AEST) Received: from localhost ([::1]:45370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYrm-0006uT-Vy for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:40:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkL-0004BE-6p for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:33 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:37157) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkK-0007Xb-7V for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:32 -0400 Received: by mail-wr1-x443.google.com with SMTP id x13so20071689wrv.4 for ; Tue, 09 Jun 2020 00:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BKwzKZtrbxU02j73ueEcyHllddh/ol1Dq+AGgYyiyJs=; b=t3HhdleIImJBA0xMLGx7YL3FR2NxtWCDWJ1qFSCsxOwINNeOjndksMM5sBWoeLJMxa nclJnQ62hikK3rX7dD1QTF+ZFkMhFhTSoPRrgtaM/wcDP2q2PBjXO5Ek+ndYrbK6kkvD 5GFxB6bNUSeusPEi97pqCyehrGPUOZQ1ARxzoc2PXEOsZd+5fHTkszm1GujOathvaCvI LiN94VIKb0BOtgFOcfCDXZ3YJNZFSFOaZ90RyYM6giEBkiWp+IJffPLQbBY2duUSARdV brmehWTQHtBLPO31gsIvKZWhjfv529OTA3DHskxKwTNIdcadfDGC+h5B+ZvAa8UwUd2c WITA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BKwzKZtrbxU02j73ueEcyHllddh/ol1Dq+AGgYyiyJs=; b=AH71V84Asrau4JuQfZ0LI23inMzVKIAr5+ddgyIQXDcFqPznm96VCGoPAcl0JUt0rk 6PA0IKalya8Ai9Wey595pP/i+5iiwjZ9ub2bbkGdqJb9Q67K3e8nkG89uV7ZsTCOcjKd ajCjuXupJ5Yzfc9sRbccg1d6v8nYUzXNz1cOQgCebvQvH3RO5q55kgBEOCyCVQ03bGJp iH54wKf03yW0zhhXKVmM5fFesUW4A8V2/u2IzlSpeodkoSw3JAKPPnSS6OHvkgBaUpDT FkUlY8CcRKg5naoKvV0D7iAxLuLVsfG6bCE35SIt5ZgrjzcYL8TtFfCGCYeLYNP4Ry1K 5wgQ== X-Gm-Message-State: AOAM532VKEIR6cU7VA1y69vB34jGtaCV2bBula8O3TcKPXK3t8K5mjvq 8ecKqgXi7PO6mdia+m8w3eZ+hST1 X-Google-Smtp-Source: ABdhPJxPyA+960c94CGmRIQcTTddtKuPFlnmmzmpQNg/tnzGht2WMYg+gQm6RwqVBteTcit9id/7ew== X-Received: by 2002:a5d:4e88:: with SMTP id e8mr3022757wru.188.1591687950134; Tue, 09 Jun 2020 00:32:30 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 12/16] hw/misc/grlib_ahb_apb_pnp: Fix AHB PnP 8-bit accesses Date: Tue, 9 Jun 2020 09:32:10 +0200 Message-Id: <20200609073214.14079-13-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The Plug & Play region of the AHB/APB bridge can be accessed by various word size, however the implementation is clearly restricted to 32-bit: static uint64_t grlib_ahb_pnp_read(void *opaque, hwaddr offset, unsigned size) { AHBPnp *ahb_pnp = GRLIB_AHB_PNP(opaque); return ahb_pnp->regs[offset >> 2]; } Similarly to commit 0fbe394a64 with the APB PnP registers, set the MemoryRegionOps::impl min/max fields to 32-bit, so memory.c::access_with_adjusted_size() can adjust when the access is not 32-bit. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: KONRAD Frederic Message-Id: <20200331105048.27989-4-f4bug@amsat.org> --- hw/misc/grlib_ahb_apb_pnp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/misc/grlib_ahb_apb_pnp.c b/hw/misc/grlib_ahb_apb_pnp.c index 72a8764776..d22ed00206 100644 --- a/hw/misc/grlib_ahb_apb_pnp.c +++ b/hw/misc/grlib_ahb_apb_pnp.c @@ -146,6 +146,10 @@ static const MemoryRegionOps grlib_ahb_pnp_ops = { .read = grlib_ahb_pnp_read, .write = grlib_ahb_pnp_write, .endianness = DEVICE_BIG_ENDIAN, + .impl = { + .min_access_size = 4, + .max_access_size = 4, + }, }; static void grlib_ahb_pnp_realize(DeviceState *dev, Error **errp) From patchwork Tue Jun 9 07:32:11 2020 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: 1305632 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=YGxQVAui; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h24c0lrtz9sT5 for ; Tue, 9 Jun 2020 17:36:47 +1000 (AEST) Received: from localhost ([::1]:59504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYoP-00017i-HU for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkL-0004Cq-UY for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:33 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:42763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkK-0007Xh-WC for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:33 -0400 Received: by mail-wr1-x42b.google.com with SMTP id p5so20045211wrw.9 for ; Tue, 09 Jun 2020 00:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9a9rBXB8KD2CXSqoopyENJkbJU2VWTQAQ5EXFbh1LNA=; b=YGxQVAuiXdbwv6EeStmq/ck0IrzGmKhrLXGTjX4NSrLG9ggiBo/wUGQpDFZfoHZ8Lj cplbrJCHMyk60j3WPI22pbSRkAyKDdnxv1UIU+IGr9noeqaQ/vSvU9e45j2sh6INImLF v04KRjgoJNOL2AKrSnICCvT3uiGBqhfpracS5jugZHFwLUSgurwwmSzaULP0Qzskv54+ +4PK41yVNjy/a9gCPz2mMdVzvbJCRAsUMl1zX8xBitMCv+d+iGnz7nl1H/XhCu4B3Zvv rP49OJBV3te4gCe8BCLLEFYW35uXYrP6cdsEyLfsAaqAD8zWR8on1ffdEMAfutON76CU 5BRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=9a9rBXB8KD2CXSqoopyENJkbJU2VWTQAQ5EXFbh1LNA=; b=GVLxawLNGMtK0mzDoiQPk2HwJoZJpqO+mYbuOYGnihd3ofklmXXMF1B0ne0JP0uuY2 1di5pe2bKgp9rqmYncyPy6fqb5b2n+DVCWmjF0Bf6PRQBehtkfOakuOu1RKcUUnKniuk Y7c0JMCsqzmiF3fEXYAczfjtXLu9sPRhkN+wYd1GkhZnz08BBZfsnqdaVoZzqcIO3tMt FKj28bLRriNmU1PQTlmfmq2wIQb+NluXABaOcbVPlxjpRGNgIjdyVIQLB88NR1hPqtVf 1wZCuq4bkARq9O4OHgfDNVI0zqREaZroXUxoCBaHrUM9VcHYWB5rmfvHgzz9Rap74DEu 197g== X-Gm-Message-State: AOAM531YrqXPhHkEfh0PQaOf/Pga03NfTMkHAHB+apyHKYBO8N83jR4B BF06psSo/lIKfEc6oyAYVQ2UGw/d X-Google-Smtp-Source: ABdhPJxMHLkrxcsKH3bmqZgBNXfsMl++/2EONiMbAe3UgadSbv5d/xaO97cK9ri64yKMG70km4LOmA== X-Received: by 2002:adf:e749:: with SMTP id c9mr3114054wrn.25.1591687951237; Tue, 09 Jun 2020 00:32:31 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 13/16] hw/misc/grlib_ahb_apb_pnp: Add trace events on read accesses Date: Tue, 9 Jun 2020 09:32:11 +0200 Message-Id: <20200609073214.14079-14-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: KONRAD Frederic Message-Id: <20200331105048.27989-5-f4bug@amsat.org> --- hw/misc/grlib_ahb_apb_pnp.c | 13 +++++++++++-- hw/misc/trace-events | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/misc/grlib_ahb_apb_pnp.c b/hw/misc/grlib_ahb_apb_pnp.c index d22ed00206..43e001c3c7 100644 --- a/hw/misc/grlib_ahb_apb_pnp.c +++ b/hw/misc/grlib_ahb_apb_pnp.c @@ -25,6 +25,7 @@ #include "qemu/log.h" #include "hw/sysbus.h" #include "hw/misc/grlib_ahb_apb_pnp.h" +#include "trace.h" #define GRLIB_PNP_VENDOR_SHIFT (24) #define GRLIB_PNP_VENDOR_SIZE (8) @@ -132,8 +133,12 @@ void grlib_ahb_pnp_add_entry(AHBPnp *dev, uint32_t address, uint32_t mask, static uint64_t grlib_ahb_pnp_read(void *opaque, hwaddr offset, unsigned size) { AHBPnp *ahb_pnp = GRLIB_AHB_PNP(opaque); + uint32_t val; - return ahb_pnp->regs[offset >> 2]; + val = ahb_pnp->regs[offset >> 2]; + trace_grlib_ahb_pnp_read(offset, val); + + return val; } static void grlib_ahb_pnp_write(void *opaque, hwaddr addr, @@ -239,8 +244,12 @@ void grlib_apb_pnp_add_entry(APBPnp *dev, uint32_t address, uint32_t mask, static uint64_t grlib_apb_pnp_read(void *opaque, hwaddr offset, unsigned size) { APBPnp *apb_pnp = GRLIB_APB_PNP(opaque); + uint32_t val; - return apb_pnp->regs[offset >> 2]; + val = apb_pnp->regs[offset >> 2]; + trace_grlib_apb_pnp_read(offset, val); + + return val; } static void grlib_apb_pnp_write(void *opaque, hwaddr addr, diff --git a/hw/misc/trace-events b/hw/misc/trace-events index 0cb4c64ae7..5561746866 100644 --- a/hw/misc/trace-events +++ b/hw/misc/trace-events @@ -202,3 +202,7 @@ via1_rtc_cmd_pram_read(int addr, int value) "addr=%u value=0x%02x" via1_rtc_cmd_pram_write(int addr, int value) "addr=%u value=0x%02x" via1_rtc_cmd_pram_sect_read(int sector, int offset, int addr, int value) "sector=%u offset=%u addr=%d value=0x%02x" via1_rtc_cmd_pram_sect_write(int sector, int offset, int addr, int value) "sector=%u offset=%u addr=%d value=0x%02x" + +# grlib_ahb_apb_pnp.c +grlib_ahb_pnp_read(uint64_t addr, uint32_t value) "AHB PnP read addr:0x%03"PRIx64" data:0x%08x" +grlib_apb_pnp_read(uint64_t addr, uint32_t value) "APB PnP read addr:0x%03"PRIx64" data:0x%08x" From patchwork Tue Jun 9 07:32:12 2020 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: 1305645 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=r9/htUar; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h2BB1yRLz9sRN for ; Tue, 9 Jun 2020 17:41:38 +1000 (AEST) Received: from localhost ([::1]:51216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYt6-000138-1k for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:41:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkM-0004F9-RG for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:34 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:44821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkL-0007Xy-Vk for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:34 -0400 Received: by mail-wr1-x42c.google.com with SMTP id y17so20042787wrn.11 for ; Tue, 09 Jun 2020 00:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vkDRcgvL+D9VvdrCQbP1oNaPKjBqDOyIV9cIwQ5Bh2E=; b=r9/htUarQjXUCye73m5T4O1iYdrevKTE3fpe8UDL8dg1uK5S2rRIAme+RaK7EKQq/L JFoRZvryJ1LHB3YhR3UdqBmt5cExy6rIaJXDmpbwip7wYIlPWxvBHfevNexU/MpSiVBd nnuEJBjtGw/zYLqyFmf/l4wVngKE2P+lEJ9CzI7kWU7ndqAbM2EgLV5Vc69hfm+lEG3T 9Nv4ExZ9U5PTkc9PI0pgDRsWl5jDO/0VymdBlP50qQEsX6c77VtCDAotyjp8xDE6hTKg Wx3/6IzhcWctjOXsDb8wB7h2LPYx+2Y4s91SS9rl9pRgELu8w6Zco4NPaD+soTQUAjrd lFMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=vkDRcgvL+D9VvdrCQbP1oNaPKjBqDOyIV9cIwQ5Bh2E=; b=VuASum0Pq2cDriHaUW81z3rx9Ja4yndMdOLDmQYiIcZQiy3M431s8y4zTGJNHaywQD QP8hOFxn5bXM47mPQAr4FIgoIEHF7z9j/8dXPxRKlgBiWddO6FEclBkjgwRq5xp82lil nDsCKfgN9NoW0TAHDPshYefrJ5i5P7ENhj5rx9d19OO4iQO7Cv3+gtrwnzQ8SAdo88iU HljWRSnJiIc7xyKbD+zr7S+wG2Ne7ciHAyg7VpX92erBDiokRFc9QyQbWA/Z6INvVmA4 PgT99auqmRrxjvwQgiSqnruJ9GLOdnNhbc2S4HidOzZWBHafk5ppW8raDvQiGQHmSDhn qjwQ== X-Gm-Message-State: AOAM532Fi/+6azm0Eps5fhfzrjCJndKixoJHxA4T8sEMatW5aQouNpNv hxEIJFTBuIjJwXYZLLLmky8NySmi X-Google-Smtp-Source: ABdhPJy1fXTHwxCweDUDKIDIRWTpyljuvVJFozyQX++LgzWAkEKxIE14RFyUJlN+yho2e8MI3thEPg== X-Received: by 2002:adf:b348:: with SMTP id k8mr3168408wrd.157.1591687952391; Tue, 09 Jun 2020 00:32:32 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 14/16] hw/timer/grlib_gptimer: Display frequency in decimal Date: Tue, 9 Jun 2020 09:32:12 +0200 Message-Id: <20200609073214.14079-15-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: KONRAD Frederic Message-Id: <20200331105048.27989-6-f4bug@amsat.org> --- hw/timer/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/trace-events b/hw/timer/trace-events index 80ea197594..866c9f546a 100644 --- a/hw/timer/trace-events +++ b/hw/timer/trace-events @@ -19,7 +19,7 @@ slavio_timer_mem_writel_invalid(uint64_t addr) "invalid write address 0x%"PRIx64 grlib_gptimer_enable(int id, uint32_t count) "timer:%d set count 0x%x and run" grlib_gptimer_disabled(int id, uint32_t config) "timer:%d Timer disable config 0x%x" grlib_gptimer_restart(int id, uint32_t reload) "timer:%d reload val: 0x%x" -grlib_gptimer_set_scaler(uint32_t scaler, uint32_t freq) "scaler:0x%x freq: 0x%x" +grlib_gptimer_set_scaler(uint32_t scaler, uint32_t freq) "scaler:0x%x freq:%uHz" grlib_gptimer_hit(int id) "timer:%d HIT" grlib_gptimer_readl(int id, uint64_t addr, uint32_t val) "timer:%d addr 0x%"PRIx64" 0x%x" grlib_gptimer_writel(int id, uint64_t addr, uint32_t val) "timer:%d addr 0x%"PRIx64" 0x%x" From patchwork Tue Jun 9 07:32:13 2020 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: 1305651 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=W36hHERf; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h2FR3nS3z9sQx for ; Tue, 9 Jun 2020 17:44:27 +1000 (AEST) Received: from localhost ([::1]:33746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYvo-0005P5-Ru for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:44:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkN-0004Hf-V9 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:35 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:39490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkN-0007YE-4X for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:35 -0400 Received: by mail-wr1-x42e.google.com with SMTP id t18so20073094wru.6 for ; Tue, 09 Jun 2020 00:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P/mKxtHL0UxIRvwcZTV/zvAsg90s7x/j5V+O3iTow44=; b=W36hHERfCfDWWt1sq5dxY5LL6DlTu7P82yLIpAU4SenJ/pocvmhjz98MYSP2sVFoxW jufy9jf2tJiq72dPWvkWCUdL/vjyRrxEYKDe2/8/ETxUbQutYfpHnzOjCj/KmXCDVUNZ tjz4hYEPwdp1RfF+hMy/Upcw3at0T4ZRmJo4CcK0YHkeeZU1PtozQK164K/LxOJT8NI2 CZsqD3DLHhGjrsZYmzk2d90Csl7oBZXFhbIyxQRP4eKGWTgeNxdwi+I8gnSyHdnNpQgN CRt1wyseVg/c0eRBpqT3sAZQ/kj2E5wbnoR2lkumyukb1QzkMaralkvJVQjLfJBMdl3V XIBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=P/mKxtHL0UxIRvwcZTV/zvAsg90s7x/j5V+O3iTow44=; b=tZDzY++QT1shf85Bg1BtLMunyVxgRNR5wLBzhNfklndyvewIGERDfaLf+2rSE789RM Vx7XZMVgCBqRM8YEhfLwQ4P+QJrgfXbG8zCfy13F3nVvNJviO9D0SUaszZIkq7VDy6sO y/0i5WapG0IDdfxWAkkHNbQMNopc0mv/OlNp0SwJKzgeWnnozuTlEwOujMfIpYkWLxNT Y44KtN2XKeG4Ko/iFdU5CwmjYSReW+hzYKemRqQkYT65564kL8EoR4ALydTY2vD7HGLx XAux4+MtRhKWpcIDqv/h3Tz+V4fn+ZpOWH76mhsSvvByqcArA3YSlekOV7VNhroARf/L 2RQg== X-Gm-Message-State: AOAM532gxvPjaDyfRlX+iJm9LbaXws1Y5j4ENl2ARG/PRU1XIAWGAOi3 zE5t4KLIRiuljzWsbTU0YbJPU4Av X-Google-Smtp-Source: ABdhPJxV6BT3PE+jmGctOwa//GP20bP8SyRTOlj7B8RaAU9l2+CImuPhKdfotkn9G+eRgNluhJ5bRA== X-Received: by 2002:a5d:4bcb:: with SMTP id l11mr3065533wrt.363.1591687953481; Tue, 09 Jun 2020 00:32:33 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 15/16] target/sparc/int32_helper: Remove DEBUG_PCALL definition Date: Tue, 9 Jun 2020 09:32:13 +0200 Message-Id: <20200609073214.14079-16-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We define DEBUG_PCALL since b884fc5e (2012-10-06). 7.5 years later it is safe to assume we can remove it :) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: KONRAD Frederic Message-Id: <20200331105048.27989-7-f4bug@amsat.org> --- target/sparc/int32_helper.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/target/sparc/int32_helper.c b/target/sparc/int32_helper.c index 813b47dbb2..c56dd3df18 100644 --- a/target/sparc/int32_helper.c +++ b/target/sparc/int32_helper.c @@ -23,9 +23,7 @@ #include "exec/log.h" #include "sysemu/runstate.h" -#define DEBUG_PCALL -#ifdef DEBUG_PCALL static const char * const excp_names[0x80] = { [TT_TFAULT] = "Instruction Access Fault", [TT_ILL_INSN] = "Illegal Instruction", @@ -58,7 +56,6 @@ static const char * const excp_names[0x80] = { [TT_DIV_ZERO] = "Division By Zero", [TT_NCP_INSN] = "Coprocessor Disabled", }; -#endif void sparc_cpu_do_interrupt(CPUState *cs) { @@ -71,7 +68,6 @@ void sparc_cpu_do_interrupt(CPUState *cs) cpu_get_psr(env); } -#ifdef DEBUG_PCALL if (qemu_loglevel_mask(CPU_LOG_INT)) { static int count; const char *name; @@ -104,7 +100,6 @@ void sparc_cpu_do_interrupt(CPUState *cs) #endif count++; } -#endif #if !defined(CONFIG_USER_ONLY) if (env->psret == 0) { if (cs->exception_index == 0x80 && From patchwork Tue Jun 9 07:32:14 2020 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: 1305634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=NggRqcRL; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49h25p0LF6z9sQx for ; Tue, 9 Jun 2020 17:37:49 +1000 (AEST) Received: from localhost ([::1]:35236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiYpN-0002nY-QJ for incoming@patchwork.ozlabs.org; Tue, 09 Jun 2020 03:37:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiYkP-0004Jw-61 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:37 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:36378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiYkO-0007YN-CT for qemu-devel@nongnu.org; Tue, 09 Jun 2020 03:32:36 -0400 Received: by mail-wr1-x430.google.com with SMTP id q11so20094364wrp.3 for ; Tue, 09 Jun 2020 00:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zwLwjsoqgTFgZrqe9d7QANVT2RwPZgdh3/KDYhJg9q4=; b=NggRqcRL1dgsJBdnw+Z401yh/8hzAW9WwO0IoKb32n+qFpa4ar4xYNrWdz+9vyo/GC 6FMr17Ea/Y9Wt27Sykq8bgO+CHwt22TsIl6zvYEFPq3TOb8excMa5I3fTY4Stk8oLWs7 HaMabCcX/QkZ3PJzCbdP+2PSLxluHgtbbE7pIF014+oi6Gt2zLr7xaEIcvr8IiaFMYRz TLDJgeRFiVFUTCXksNEeie0Vmap9XeBilsVAhNv4+OIjgFCNzB970KctK5KIyrXWjcwC MYsUC/m9N+KtOfVdHfdWSFcnzTvj82/U8sPP7B2z2e7Xf3mceUIxB2xSaT8vNXU3xIOT T+ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zwLwjsoqgTFgZrqe9d7QANVT2RwPZgdh3/KDYhJg9q4=; b=uNy/UCx4gkT0Ph/IxlvqAsycfb2dj1YP+HdTW86zGwiQ++J0UrUN/7hOdEhiyTrxAf q0sMLDOQUsVeVKE31mcY/qD08CPPB2qLnNEk85QFrwYIjWh4jl0GBgHBCCsYIbjkfzhf lHMYFTTd1yZwVAto/JNHW6suWiRWOyY4gAqyjxrfG1xRU0kFo2yxbCk4IqpKamEMjyFb OzDxYqDbMRBvCI4n5llI6b8xFXXAm4uXxUgILPoNUdXnE3ZvfjMJ+ELHFDhGLx8EeEOv yrFWXrMn95+qFTQhn3t4DQtDye9ior/vrAmO658O1ISz2j1L/3vxmSDtcQ6gy8GoziJq HQFw== X-Gm-Message-State: AOAM533UDF+7zaz02TPHKHUN3+jVmDfe7huNupEnsT6j8J0R54PsU192 Zb3IdziuL6Vj17Vg/GJzkANG8173 X-Google-Smtp-Source: ABdhPJw4x+X9Le+6CgfIMJ07XpbJsFk8TLYpGTXwUBKZT9TJkLn98ef/8yoN2NmHEQiAd+PJ4/Vk5g== X-Received: by 2002:a05:6000:1192:: with SMTP id g18mr3020148wrx.326.1591687954787; Tue, 09 Jun 2020 00:32:34 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id m3sm2036192wmc.0.2020.06.09.00.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 00:32:34 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 16/16] target/sparc/int32_helper: Extract and use excp_name_str() Date: Tue, 9 Jun 2020 09:32:14 +0200 Message-Id: <20200609073214.14079-17-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200609073214.14079-1-f4bug@amsat.org> References: <20200609073214.14079-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x430.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Aleksandar Rikalo , Mark Cave-Ayland , KONRAD Frederic , Fabien Chouteau , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Improve exception error report: Before: qemu: fatal: Trap 0x06 while interrupts disabled, Error state After: qemu: fatal: Trap 0x06 (Window Underflow) while interrupts disabled, Error state Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: KONRAD Frederic Message-Id: <20200331105048.27989-8-f4bug@amsat.org> --- target/sparc/int32_helper.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/target/sparc/int32_helper.c b/target/sparc/int32_helper.c index c56dd3df18..9a71e1abd8 100644 --- a/target/sparc/int32_helper.c +++ b/target/sparc/int32_helper.c @@ -57,6 +57,14 @@ static const char * const excp_names[0x80] = { [TT_NCP_INSN] = "Coprocessor Disabled", }; +static const char *excp_name_str(int32_t exception_index) +{ + if (exception_index < 0 || exception_index >= ARRAY_SIZE(excp_names)) { + return "Unknown"; + } + return excp_names[exception_index]; +} + void sparc_cpu_do_interrupt(CPUState *cs) { SPARCCPU *cpu = SPARC_CPU(cs); @@ -77,10 +85,7 @@ void sparc_cpu_do_interrupt(CPUState *cs) } else if (intno >= 0x80) { name = "Trap Instruction"; } else { - name = excp_names[intno]; - if (!name) { - name = "Unknown"; - } + name = excp_name_str(intno); } qemu_log("%6d: %s (v=%02x)\n", count, name, intno); @@ -106,8 +111,9 @@ void sparc_cpu_do_interrupt(CPUState *cs) env->def.features & CPU_FEATURE_TA0_SHUTDOWN) { qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); } else { - cpu_abort(cs, "Trap 0x%02x while interrupts disabled, Error state", - cs->exception_index); + cpu_abort(cs, "Trap 0x%02x (%s) while interrupts disabled, " + "Error state", + cs->exception_index, excp_name_str(cs->exception_index)); } return; }