From patchwork Fri May 31 20:27:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 13682122 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 20169C27C50 for ; Fri, 31 May 2024 20:30:52 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD8rO-0002pk-Ku; Fri, 31 May 2024 16:28:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD8rM-0002oy-BQ for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:20 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD8rG-0000n8-7g for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:19 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-702555eb23bso74856b3a.1 for ; Fri, 31 May 2024 13:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1717187292; x=1717792092; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EuGNiLoanyDO7mD97RqI1BTp6/0+i7R30n1y2I4bdsk=; b=Rqgg/NjFkQ2c3/GYZSoHQp1obITT3LvPlzqhl2176Bsz5OnaXIPBK/MiD7KIBRS3XY BLpjApV9JhlenIy1fWF9p6fczSQl2dpn0gZ+o3Nchkm4mzG3l5c2ulvKRSFeuZFrWpD3 n0eYhDdT+FvFCg+A3u3NfZOHh2Rz3N3hHJ0C00ww2cIvBUcNNoVUVTtnmQu46ZjSnzi9 ULDDdpeNMvnQSBcBVh318HHDJtFmaY/7hhuRh+x58a9qC+4qxB32Z8tT8qMK9ZCb92oG zIiiaDcHByh+fF0VJ8dKY6lTxQ30PulWNEbZATyNByGoLEGYKgqLROGre+A23FwHF5Pl EkJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717187292; x=1717792092; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EuGNiLoanyDO7mD97RqI1BTp6/0+i7R30n1y2I4bdsk=; b=lql5nAp6DqUi5idQIoOIeHfwua73Plax7zZd3MijWo8weU5v4BR0PYY53Pb1nMHryD 1dyUZtAeh/IgfNJpdKgNzYRR9NPtKo7I4CPXc8efRmOTXGLek9bEMNc4WWS7GovbMRwd wndDwyCoTqXmqiaFPgeivpIg8CejmtmYrSeEWQo946pMXl1qaE0pRbq7FawOY3XqoOJm 3AQH5dqqhwNZosvzezdtgPzhJvCzTeQmX5mCxKR7fGi7+Uragsj+p3Lq4Tjgchwsa9WC 6XkrnU7touEZhKtVTgl/bgwDfbT8Mj0Eia1QxV1hFix6FfRH4Bm6jkj+h3n1N8QVSoyk gj8Q== X-Gm-Message-State: AOJu0Yy4OF4PyPhIFpFOSsgxj2jZQRlTrJO3wMvvMD/sAPZhVMd7tbq7 y78WX0mx1b2U/hqcS5ZrCtkguOEzdhIGn/m9Yj+bgaFTbNa5jqYFDmmc2Zdw6nV7NhwbYozLS8f g X-Google-Smtp-Source: AGHT+IEmW2poHiw7iUCvfD/PL0YJbRQCHPcLTvCRoZAEWaBidsgbxL9BDLPkn8LQoMKfNAhzPRLZnw== X-Received: by 2002:a05:6a00:130c:b0:6ed:6b11:4076 with SMTP id d2e1a72fcca58-702477e4893mr2232988b3a.12.1717187292266; Fri, 31 May 2024 13:28:12 -0700 (PDT) Received: from grind.dc1.ventanamicro.com (189-69-160-78.dial-up.telesp.net.br. [189.69.160.78]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242b09133sm1819691b3a.178.2024.05.31.13.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:28:11 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, apatel@ventanamicro.com, ajones@ventanamicro.com, conor@kernel.org, Daniel Henrique Barboza Subject: [PATCH v2 1/8] hw/riscv/virt.c: add address-cells in create_fdt_one_aplic() Date: Fri, 31 May 2024 17:27:52 -0300 Message-ID: <20240531202759.911601-2-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240531202759.911601-1-dbarboza@ventanamicro.com> References: <20240531202759.911601-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=dbarboza@ventanamicro.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org We need #address-cells properties in all interrupt controllers that are referred by an interrupt-map [1]. For the RISC-V machine, both PLIC and APLIC controllers must have this property. PLIC already sets it in create_fdt_socket_plic(). Set the property for APLIC in create_fdt_one_aplic(). [1] https://lore.kernel.org/linux-arm-kernel/CAL_JsqJE15D-xXxmELsmuD+JQHZzxGzdXvikChn6KFWqk6NzPw@mail.gmail.com/ Suggested-by: Anup Patel Fixes: e6faee65855b ("hw/riscv: virt: Add optional AIA APLIC support to virt machine") Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 2 ++ include/hw/riscv/virt.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 4fdb660525..1a7e1e73c5 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -609,6 +609,8 @@ static void create_fdt_one_aplic(RISCVVirtState *s, int socket, aplic_name = g_strdup_printf("/soc/aplic@%lx", aplic_addr); qemu_fdt_add_subnode(ms->fdt, aplic_name); qemu_fdt_setprop_string(ms->fdt, aplic_name, "compatible", "riscv,aplic"); + qemu_fdt_setprop_cell(ms->fdt, aplic_name, "#address-cells", + FDT_APLIC_ADDR_CELLS); qemu_fdt_setprop_cell(ms->fdt, aplic_name, "#interrupt-cells", FDT_APLIC_INT_CELLS); qemu_fdt_setprop(ms->fdt, aplic_name, "interrupt-controller", NULL, 0); diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h index 3db839160f..c0dc41ff9a 100644 --- a/include/hw/riscv/virt.h +++ b/include/hw/riscv/virt.h @@ -118,6 +118,7 @@ enum { #define FDT_PLIC_ADDR_CELLS 0 #define FDT_PLIC_INT_CELLS 1 #define FDT_APLIC_INT_CELLS 2 +#define FDT_APLIC_ADDR_CELLS 0 #define FDT_IMSIC_INT_CELLS 0 #define FDT_MAX_INT_CELLS 2 #define FDT_MAX_INT_MAP_WIDTH (FDT_PCI_ADDR_CELLS + FDT_PCI_INT_CELLS + \ From patchwork Fri May 31 20:27:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 13682124 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 27974C27C50 for ; Fri, 31 May 2024 20:31:24 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD8rP-0002pv-9t; Fri, 31 May 2024 16:28:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD8rM-0002oz-CK for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:20 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD8rK-0000nX-Mu for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:20 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-70245b22365so944766b3a.1 for ; Fri, 31 May 2024 13:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1717187297; x=1717792097; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J+v0oYsrs60BFJiSO6oNRIio4iuCfxznllRGF2qwCVI=; b=b0K8qvYkiLSI+0itwTphLE2IdwpexNhgOyC1rQJiaguWHh1aPF1iBHchgbvBqXQYe0 O/e2qjDUM2SwqSq1znJ6izh50Vtn5awsqMTfDPnR7KharElRSoYTdF81nQWRD46BMr3U MWp+2dvJIKNNw6ri/bi+umiE8Z4rjA1rNUYQCzGK91Q46llatpbPtPZqC6AEtEM5bUKY U35uH8OD/2vkK2tT/tAP8bsLjbKIOCeL1CjlZGAje9hilYhY74OSb+aWSzoFQpvG/AZi 4MUKF9FdrNpxTtKHnmrqiuDg3AvbhhYI6wlFno0eNr1A0c/b7wNnLVLrE7ePQhlQ4HR3 Yuww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717187297; x=1717792097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J+v0oYsrs60BFJiSO6oNRIio4iuCfxznllRGF2qwCVI=; b=VkD/b4SoWypEKgqA5CVQjRm2dXLza2rxWba2gJJRNz9mni6lMU5vhWmmLS05Zclo/i iImUSIJWXQ1ZTh30IzyXedqHO9qyVpiQTmXJCWgz26d4RIus2OrGBcsWdENcVt8BDFLK ePwEKTm2TqMYCfMFuC75Ncp7Ul+hHcq3ZvWE0l2aNLjprMUI8/LSwGdtONCCY9vVER2Z k1dMzQElocPm/Gpz5ZVUDZTYXAp6iRcm8sxxWA7auG9IeELG41UIoM7RH2S8t3sEz8LV XszUKiAtNRZpxZXIyraueD2dNpXDnWxoJSbLySn0eRC2EardxJjtfI9bhOaRALzlEOow b+7w== X-Gm-Message-State: AOJu0YxUyX6LpcfPgvJUfdVsu/Hh88uY+V+TwC43V4LrhzW7x3HYBBo6 430dMBfuWy7PGl1YVifsWwx+J6HFefQAreStwxCsVhRnkIHOeWwBWqdu5D00CcSwYq9y1nwi1IT W X-Google-Smtp-Source: AGHT+IFi26WDHZRmk9PwU0pSBWGScPFKyKDf0saOo2VuuREYs24i6bQ6SQlFZ9ofEFsgxIxrDHHlKA== X-Received: by 2002:a05:6a20:7f96:b0:1b2:6054:c8ba with SMTP id adf61e73a8af0-1b26f30e4d4mr3047560637.56.1717187296779; Fri, 31 May 2024 13:28:16 -0700 (PDT) Received: from grind.dc1.ventanamicro.com (189-69-160-78.dial-up.telesp.net.br. [189.69.160.78]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242b09133sm1819691b3a.178.2024.05.31.13.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:28:16 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, apatel@ventanamicro.com, ajones@ventanamicro.com, conor@kernel.org, Daniel Henrique Barboza Subject: [PATCH v2 2/8] hw/riscv/virt.c: add aplic nodename helper Date: Fri, 31 May 2024 17:27:53 -0300 Message-ID: <20240531202759.911601-3-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240531202759.911601-1-dbarboza@ventanamicro.com> References: <20240531202759.911601-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=dbarboza@ventanamicro.com; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org We'll change the aplic DT nodename in the next patch and the name is hardcoded in 2 different functions. Create a helper to change a single place later. While we're at it, in create_fdt_socket_aplic(), move 'aplic_name' inside the conditional to avoid allocating a string that won't be used when socket == NULL. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 1a7e1e73c5..07a07f5ce1 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -588,6 +588,12 @@ static void create_fdt_imsic(RISCVVirtState *s, const MemMapEntry *memmap, } +/* Caller must free string after use */ +static char *fdt_get_aplic_nodename(unsigned long aplic_addr) +{ + return g_strdup_printf("/soc/aplic@%lx", aplic_addr); +} + static void create_fdt_one_aplic(RISCVVirtState *s, int socket, unsigned long aplic_addr, uint32_t aplic_size, uint32_t msi_phandle, @@ -597,7 +603,7 @@ static void create_fdt_one_aplic(RISCVVirtState *s, int socket, bool m_mode, int num_harts) { int cpu; - g_autofree char *aplic_name = NULL; + g_autofree char *aplic_name = fdt_get_aplic_nodename(aplic_addr); g_autofree uint32_t *aplic_cells = g_new0(uint32_t, num_harts * 2); MachineState *ms = MACHINE(s); @@ -606,7 +612,6 @@ static void create_fdt_one_aplic(RISCVVirtState *s, int socket, aplic_cells[cpu * 2 + 1] = cpu_to_be32(m_mode ? IRQ_M_EXT : IRQ_S_EXT); } - aplic_name = g_strdup_printf("/soc/aplic@%lx", aplic_addr); qemu_fdt_add_subnode(ms->fdt, aplic_name); qemu_fdt_setprop_string(ms->fdt, aplic_name, "compatible", "riscv,aplic"); qemu_fdt_setprop_cell(ms->fdt, aplic_name, "#address-cells", @@ -648,7 +653,6 @@ static void create_fdt_socket_aplic(RISCVVirtState *s, uint32_t *aplic_phandles, int num_harts) { - g_autofree char *aplic_name = NULL; unsigned long aplic_addr; MachineState *ms = MACHINE(s); uint32_t aplic_m_phandle, aplic_s_phandle; @@ -674,9 +678,8 @@ static void create_fdt_socket_aplic(RISCVVirtState *s, aplic_s_phandle, 0, false, num_harts); - aplic_name = g_strdup_printf("/soc/aplic@%lx", aplic_addr); - if (!socket) { + g_autofree char *aplic_name = fdt_get_aplic_nodename(aplic_addr); platform_bus_add_all_fdt_nodes(ms->fdt, aplic_name, memmap[VIRT_PLATFORM_BUS].base, memmap[VIRT_PLATFORM_BUS].size, From patchwork Fri May 31 20:27:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 13682120 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4CA22C27C50 for ; Fri, 31 May 2024 20:29:29 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD8rR-0002qt-VD; Fri, 31 May 2024 16:28:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD8rQ-0002qb-Q2 for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:24 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD8rP-0000o6-7R for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:24 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-7024f09bc92so578281b3a.1 for ; Fri, 31 May 2024 13:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1717187301; x=1717792101; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0bdJR0XZ5/24do9SQiq86W34Uey5skxXwaEjBErRH+E=; b=ZPkBnqrSgK1Qz9uEyN36e/Q1eMn/TBZFwFhnehtxiXhINlIoODoj5BIJNli5sEaOLV f90+AG4YT7MdOwkqlSSaNNLTivRvAeeK1TPOLH0FNGqHn8BAhtdNYJVVj8oMUa8cizMM yAHrAEUCMBPQtdINQqLFeOW9+80RDbn5H/yuNpFWW9Kjoq682R7ZTs0fGmZ3Li5rEzi4 rdrd0DZdPyymf+3gk48w6VvxLYMu7erOvDjk3USNAnj/1ISz3BIDkHewe2yG61csJToS t1r9u+lmJ5H+dPT0UaAPC5pXlqio29Inp894uXBwV2jJ4C0esbhI3Eg96AvzDIDLzPij DbHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717187301; x=1717792101; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0bdJR0XZ5/24do9SQiq86W34Uey5skxXwaEjBErRH+E=; b=f8qwLFvkC81/XXELGvpZP9pj9wa1ZwATQvb/m5ZxAHP6wUa8tzuy0acVmMlCMxn5Br C/l3+wkHxbtsKwqrdbumiZ5b++htT+qDc8qJcNjXCcaE0/b5CsjsZ749yPRKcsTr+W79 2i1uMeh+eJ2YTwK3lhKGNyGAj0Ia9EHvg4XldhpO+IKrXxZ37fZeTmQ6FxSCycNRCzcL +J77f3MqjRFWzz8l/xd2ur9ZtPP+kfl+j9rCNm4j41T1S0DIkZ2p0G5pZUQ9KUFAxFBd 7Fq2B4ZMoGjn2dKplLzuTRRXL1MMvvmb27fIKLXE2bzaCGQ/vkRFlsy25HECN/v58kNF iZjA== X-Gm-Message-State: AOJu0YxdcTYiqXxh+OuJFNf8/y3k9f2F81/d/FMOvGNpyB6ODGvulSZM Ctf1LdcTDf9w/Iiz+C5yu7Of9qpcuhexXY36h94Iz4xiC39ibSiay8oqy2KsVBijaOU5AiVdJb1 s X-Google-Smtp-Source: AGHT+IF2T/GZ3JkT8S1HTxAYTAgaqXTDX3NnqWRvJOC99F1H7XWhK8BKeGrTCEJq+ZzzPsZRFWIkDg== X-Received: by 2002:a05:6a20:729a:b0:1af:597f:4970 with SMTP id adf61e73a8af0-1b26f1179c7mr3831730637.24.1717187301094; Fri, 31 May 2024 13:28:21 -0700 (PDT) Received: from grind.dc1.ventanamicro.com (189-69-160-78.dial-up.telesp.net.br. [189.69.160.78]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242b09133sm1819691b3a.178.2024.05.31.13.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:28:20 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, apatel@ventanamicro.com, ajones@ventanamicro.com, conor@kernel.org, Daniel Henrique Barboza Subject: [PATCH v2 3/8] hw/riscv/virt.c: rename aplic nodename to 'interrupt-controller' Date: Fri, 31 May 2024 17:27:54 -0300 Message-ID: <20240531202759.911601-4-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240531202759.911601-1-dbarboza@ventanamicro.com> References: <20240531202759.911601-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=dbarboza@ventanamicro.com; helo=mail-pf1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The correct name of the aplic controller node, as per Linux kernel DT docs [1], is 'interrupt-controller@addr'. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml Reported-by: Conor Dooley Fixes: e6faee65855b ("hw/riscv: virt: Add optional AIA APLIC support to virt machine") Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 07a07f5ce1..5505047945 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -591,7 +591,7 @@ static void create_fdt_imsic(RISCVVirtState *s, const MemMapEntry *memmap, /* Caller must free string after use */ static char *fdt_get_aplic_nodename(unsigned long aplic_addr) { - return g_strdup_printf("/soc/aplic@%lx", aplic_addr); + return g_strdup_printf("/soc/interrupt-controller@%lx", aplic_addr); } static void create_fdt_one_aplic(RISCVVirtState *s, int socket, From patchwork Fri May 31 20:27:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 13682119 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B2447C25B75 for ; Fri, 31 May 2024 20:29:28 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD8rW-0002se-W6; Fri, 31 May 2024 16:28:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD8rU-0002rk-QZ for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:28 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD8rT-0000oa-Bl for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:28 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-70222db9bf1so2281692b3a.0 for ; Fri, 31 May 2024 13:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1717187305; x=1717792105; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MzNPC1l1l92btYoSfQnEt7eZTgNylgvzDqncd7AHrIk=; b=Zkrinu360iCSkUVh4oZBZernn68gkH/NcpNlRTDlQrG5q2frHPVv9fHDXumUuMbQuz POibMuNUWT2KCR+LTFvZ38hs+DRMW6einZTwl2DCXt+xcUsnAdgBFl9yqzqx+BN2s9g8 JidtWV+O1XxNBjVbcbDnspO9RzG5jF8vIrT0qLMoAaQrT5KFe6XFAil1VW+ytfE40atZ onBlUjnat5CAnKh2pN3Iq/AxyLgzbCKdNfv4RNGTaN/1dEfLDeoS3jpZK372SJtaSHEb bI9MxoVy1719v/fYWCyF9QrSKVJn+Mas/Q9naEJVhl2RZ5HRW4qHTKx2eR1CySZ/Bie/ RPjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717187305; x=1717792105; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MzNPC1l1l92btYoSfQnEt7eZTgNylgvzDqncd7AHrIk=; b=ZSSGs3s0RSgMSde1D1CKmmcP+Yg8rpqpyQ9I2X1HU8BbVGptDerY58eeWn/5KnD3Go JfWnxdVHpnUgUEF+e71t+RE303w7oCvO1LubAo9Fymt8AkotIJRkFCrauszdqoW7QHV7 N0sKRWQ6Hk2HA/p3PE4asfU4tERYpKcwABHuOcWC4XeJ9ewjY0d4LDVMjf/okxC2M3Xz ZLAzDMgBxp2gqdR0lKyLqlcOQ//jiw60+lYzEH8VdF6wFn6Hc4YDUmqiAui2IOBMah2g 7zcQESg1IoBzNACarY1bCg2Q3oJmYujBDo7Z+jq/ceAjp9OG2q6p08yfl4JTiLOG7WbH zAfA== X-Gm-Message-State: AOJu0YzjUvH5y1D6+UhpZviqP/Omvs4eaD1K3B0JmXSE2qfU31lGLsw+ 7ejMsZhdRq6FmWTfliFG+MfL0W1z/+ii7cLNHYWTZOH+RPz9kELKmyc1UmZN+SIdpHF8cYJxESv A X-Google-Smtp-Source: AGHT+IEvkJsylHUTAcqIZnJsJykuKdsaHEly7//hw0lFmBXY4zaNJAxdfQS77zYJgSA12KtIxZvAdw== X-Received: by 2002:a05:6a00:4099:b0:6f8:b6a1:317d with SMTP id d2e1a72fcca58-702478cc5famr3201287b3a.34.1717187305420; Fri, 31 May 2024 13:28:25 -0700 (PDT) Received: from grind.dc1.ventanamicro.com (189-69-160-78.dial-up.telesp.net.br. [189.69.160.78]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242b09133sm1819691b3a.178.2024.05.31.13.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:28:25 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, apatel@ventanamicro.com, ajones@ventanamicro.com, conor@kernel.org, Daniel Henrique Barboza Subject: [PATCH v2 4/8] hw/riscv/virt.c: aplic DT: add 'qemu, aplic' to 'compatible' Date: Fri, 31 May 2024 17:27:55 -0300 Message-ID: <20240531202759.911601-5-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240531202759.911601-1-dbarboza@ventanamicro.com> References: <20240531202759.911601-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=dbarboza@ventanamicro.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The DT docs for riscv,aplic [1] predicts a 'qemu,aplic' enum in the 'compatible' property. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml Reported-by: Conor Dooley Fixes: e6faee65855b ("hw/riscv: virt: Add optional AIA APLIC support to virt machine") Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 5505047945..366fe042cc 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -606,6 +606,9 @@ static void create_fdt_one_aplic(RISCVVirtState *s, int socket, g_autofree char *aplic_name = fdt_get_aplic_nodename(aplic_addr); g_autofree uint32_t *aplic_cells = g_new0(uint32_t, num_harts * 2); MachineState *ms = MACHINE(s); + static const char * const aplic_compat[2] = { + "qemu,aplic", "riscv,aplic" + }; for (cpu = 0; cpu < num_harts; cpu++) { aplic_cells[cpu * 2 + 0] = cpu_to_be32(intc_phandles[cpu]); @@ -613,7 +616,9 @@ static void create_fdt_one_aplic(RISCVVirtState *s, int socket, } qemu_fdt_add_subnode(ms->fdt, aplic_name); - qemu_fdt_setprop_string(ms->fdt, aplic_name, "compatible", "riscv,aplic"); + qemu_fdt_setprop_string_array(ms->fdt, aplic_name, "compatible", + (char **)&aplic_compat, + ARRAY_SIZE(aplic_compat)); qemu_fdt_setprop_cell(ms->fdt, aplic_name, "#address-cells", FDT_APLIC_ADDR_CELLS); qemu_fdt_setprop_cell(ms->fdt, aplic_name, From patchwork Fri May 31 20:27:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 13682133 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 346E4C25B75 for ; Fri, 31 May 2024 20:31:31 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD8ra-0002tp-Kh; Fri, 31 May 2024 16:28:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD8rY-0002t0-TR for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:32 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD8rX-0000ov-Ga for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:32 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7024d560b32so604926b3a.1 for ; Fri, 31 May 2024 13:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1717187310; x=1717792110; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9KXPUShG6rusll5cdC9KmqLcPTHGDdIHocBnKSC48v8=; b=nwqFhnLUptKhOr5CwTo6/cqDnowN2EWBO/r6yb8hhBjxAwV8MLZtnNKLA+ndW4TKPI iE/H0RPvPN4brN26NYbPLqGrob0vK7xz9NJSJR/V952Ul7jh7LyPTlfMe0NL0Pg8zRL2 ImyqkFCHjCFAFcFCUYMO5ljxeY1Z/G2yARkhi+BU46pyXzYOozfQkDssHEoyy/XkCRmr zlQVFIFa+4RoilpxQprfoYoFXSQNmksldengSuP6oSmzI0/XqDgA7THowMFfN/JYfbjy Xn97/8NRY9vks9G49DAu48mGkgqQrT11fS99qhEJvvvRbg4/Jz1H4Fy+IpHUpRMoSVu3 oV/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717187310; x=1717792110; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9KXPUShG6rusll5cdC9KmqLcPTHGDdIHocBnKSC48v8=; b=IM0K9m1IbqBZpIPN72hdbK98V6xObCZ5jyezqUxjFgY4ma5j9i80IsknUf4xygxPZq mGAT8HdzEHxCqrpJYXiQsqXtgpU+vIkpjN/rgZsyZOjmOPcEXuUkjLzNxQW4kKnjAZ0L /uBqNrFTRx6qjPT5B2+Tif0krdDcTlEejmg+hFIk4EP84L0H+3vTCc4VOkwQKg7siLBa /Av5DU9m4tyT/boz95OQtwMkjqZ9deZ3plvbXCQSQysxw4d2NPeZloBta3JOR3NNACck JuAzEpEyEk6QbtCVfmT+j+4mRG/r9PgGjo9f4qgP98k2bZFa1kd/QRyTYv8BQqguJZRG ghdA== X-Gm-Message-State: AOJu0YxMo4+bUlu0Zlb6RjPWvH8IHLR9NllzJ2xa6+l4ourtZA/Yiyhq EMrS2RHThiuE9iP3JhlvRmECH+Z+Tpb2dVIamjOxbKM1Usdvr7EHFRtksbc+ZKpmjSYDK3EuYxz 1 X-Google-Smtp-Source: AGHT+IFobnGI5sFqVbxy80mIo0jzYafACQqRLu3QHCc9QyjPdqa2s2dCJfC620sVm+N93+G9YB+Y7A== X-Received: by 2002:a05:6a00:8813:b0:702:4a1d:c4a4 with SMTP id d2e1a72fcca58-7024a1dd1camr3700513b3a.10.1717187309762; Fri, 31 May 2024 13:28:29 -0700 (PDT) Received: from grind.dc1.ventanamicro.com (189-69-160-78.dial-up.telesp.net.br. [189.69.160.78]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242b09133sm1819691b3a.178.2024.05.31.13.28.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:28:29 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, apatel@ventanamicro.com, ajones@ventanamicro.com, conor@kernel.org, Daniel Henrique Barboza Subject: [PATCH v2 5/8] hw/riscv/virt.c: aplic DT: rename prop to 'riscv, delegation' Date: Fri, 31 May 2024 17:27:56 -0300 Message-ID: <20240531202759.911601-6-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240531202759.911601-1-dbarboza@ventanamicro.com> References: <20240531202759.911601-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=dbarboza@ventanamicro.com; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The DT docs for riscv,aplic [1] predicts a 'riscv,delegation' property. Not 'riscv,delegate'. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml Reported-by: Conor Dooley Fixes: e6faee65855b ("hw/riscv: virt: Add optional AIA APLIC support to virt machine") Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 366fe042cc..0a18547c6d 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -640,7 +640,7 @@ static void create_fdt_one_aplic(RISCVVirtState *s, int socket, if (aplic_child_phandle) { qemu_fdt_setprop_cell(ms->fdt, aplic_name, "riscv,children", aplic_child_phandle); - qemu_fdt_setprop_cells(ms->fdt, aplic_name, "riscv,delegate", + qemu_fdt_setprop_cells(ms->fdt, aplic_name, "riscv,delegation", aplic_child_phandle, 0x1, VIRT_IRQCHIP_NUM_SOURCES); } From patchwork Fri May 31 20:27:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 13682121 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 06D81C27C4F for ; Fri, 31 May 2024 20:30:02 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD8rg-0002uo-7j; Fri, 31 May 2024 16:28:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD8rd-0002uN-4b for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:37 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD8rb-0000pJ-Lx for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:36 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-7024426c75dso1129832b3a.1 for ; Fri, 31 May 2024 13:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1717187314; x=1717792114; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LEwzMtiXvaSjUielpaJM9jsU8kuFGmJjx5SbXBr0Ds8=; b=UA75zMhvImAmJYF14aFU016jv4d4UYRBNmmVDOQF+wImLQZ9jhl0gast9snHOl4fr/ FBqnhHozwoJ04V20clERBD0TmPZ9ry767b2xzZ2pVhe+WHvPsv9wPOg86aBiljFEEvfa XCDg4agCgutz0pM7MvR2hwDKssl1PF20g0bvj+e9KwLlM7qOAuCAJCAYmcAa/Ex2PLWP vxZeGMIigBLAca23qdC4/Z8zqK1cNn+tCPOGsKoMVyYXmV9L711JXxGQNNCqHCpopf5E fnFysZnCHJju3MRutYR1XFepHAG8FehvqlVWTzbDTxooN1Lrscmq8kcqgaYPbmMOUws5 AhjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717187314; x=1717792114; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LEwzMtiXvaSjUielpaJM9jsU8kuFGmJjx5SbXBr0Ds8=; b=Fc7eAQb2Q2/PA8v5vBVDrFrTrq/YHGxMA0mBVjv+Mr8UiEpoW6mjynTy4xTBWiCtR/ q40pYYDL0zpvgCoDMg7JU927oElbG24HVl3ttxJ6WtpkBHwq9o4AImShjiyK9m+KQDFv aH092dnafyoLDbpxh2CnmlPC+bJc93n8GP5AOFhwurAm1alpxteH4jgZ0ISJRdFYi1dE IoObhhpmYnw9c9f9pL5JdoniKeFML+hhYqxH7VlbaUBAY3Qv9zPO0+wE5jxPpcwv6AZa fh14jc6qrMOcAl7DqOTlwr4Sl25WIB4FnXl70laZ4SA5hc3US52DFhiMNjgZlO/c7BcR brww== X-Gm-Message-State: AOJu0YzGbkq6cIvq3gO+UQuxHaYTTt/XS31gfDTDmwfVlM/XvW52dEEE H2jLTAX4pn2ONi59Dz3sqKXK+QLIyQzDcBrasenxCd7PQyZUIs94iYG5xYJ/jC88PSlZ2hVJ88m t X-Google-Smtp-Source: AGHT+IFemzpPHqt8HZrACpayB+u/FYiqav7LBeHlDqMZBZIi3E6KV5RpB0aYN5dP0qpFkul87372lw== X-Received: by 2002:a05:6a21:1f0f:b0:1ae:3f36:28d3 with SMTP id adf61e73a8af0-1b26f253b19mr3311324637.49.1717187314109; Fri, 31 May 2024 13:28:34 -0700 (PDT) Received: from grind.dc1.ventanamicro.com (189-69-160-78.dial-up.telesp.net.br. [189.69.160.78]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242b09133sm1819691b3a.178.2024.05.31.13.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:28:33 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, apatel@ventanamicro.com, ajones@ventanamicro.com, conor@kernel.org, Daniel Henrique Barboza Subject: [PATCH v2 6/8] hw/riscv/virt.c: change imsic nodename to 'interrupt-controller' Date: Fri, 31 May 2024 17:27:57 -0300 Message-ID: <20240531202759.911601-7-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240531202759.911601-1-dbarboza@ventanamicro.com> References: <20240531202759.911601-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=dbarboza@ventanamicro.com; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The Linux DT docs for imsic [1] predicts an 'interrupt-controller@addr' node, not 'imsic@addr', given this node inherits the 'interrupt-controller' node. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,imsics.yaml Reported-by: Conor Dooley Fixes: 28d8c281200f ("hw/riscv: virt: Add optional AIA IMSIC support to virt machine") Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 0a18547c6d..56d7e945c6 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -538,7 +538,8 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, } } - imsic_name = g_strdup_printf("/soc/imsics@%lx", (unsigned long)base_addr); + imsic_name = g_strdup_printf("/soc/interrupt-controller@%lx", + (unsigned long)base_addr); qemu_fdt_add_subnode(ms->fdt, imsic_name); qemu_fdt_setprop_string(ms->fdt, imsic_name, "compatible", "riscv,imsics"); qemu_fdt_setprop_cell(ms->fdt, imsic_name, "#interrupt-cells", From patchwork Fri May 31 20:27:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 13682123 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2D146C27C4F for ; Fri, 31 May 2024 20:31:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD8rl-0002vs-5p; Fri, 31 May 2024 16:28:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD8rj-0002vg-MI for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:43 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD8rg-0000pu-2K for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:43 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7023fb5a753so1390832b3a.3 for ; Fri, 31 May 2024 13:28:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1717187318; x=1717792118; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xvxnRxIgg2C4FNw5J/4rkmdz86iMxWSW5G+jsM08/4E=; b=h2uZ2flDg4NiJuvzv1IeRg19Lt19smnEicj2S65gdYjQGom2m8kPOXoWs4qy2fwcHQ g12UPyBTR4cv6u25R6WxZt1+rMyAfKZUxk81UEn3MuVoOTgsAwQrq7vSlV88HDcxKrkC LN5Of3/aRPx0bOMOn1BnNkGfr9YUJZ1js+5d5//7lOIMDM+huTXm6scjRHjt6KaM3Q69 ESpwRdptsycaVUoJC9gL9IL1JtHa/yXFTkNA0suW5jZV5Kmhzt3QGHqyIcD21ThMT3QQ n/QMzvfsGqHvDh1Turp7PnOiaCmocS4oqa4GgzLkuGlzDn8uFZuaQ4+1+n6w7AyBaTCS o/lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717187318; x=1717792118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xvxnRxIgg2C4FNw5J/4rkmdz86iMxWSW5G+jsM08/4E=; b=AEcGG32cMkt+X/BqPszDjySonCxkfYACNoYmgfj5WDDTp7LgN+rAqSJuqmPRHrZWuY 9qg32c06WhKLw17Fe2w2Sk13M8nM18kT5eIkSChnIkNSQLXiG/WZfRvycTSJQ52jyY31 AofknHn/Y3YGFkTY2ttjdVU+SaCCZH/uPTGRaaHPiMIIKrliRgdLzhagVpljCg0CRw3g 5Pxq5lehtkoBSeYT+LV2A0MOhRdbPvFLAuZc3eCmeefv+zGYGjL9LAFQeQZjx39Qyqqm fgwFPoD9CtoqtjAZeTpBeM0m61C15aGbGgBlJsNv20uFz0zixZ5/T1WdQjRDikbtIhW2 Q/qw== X-Gm-Message-State: AOJu0YwnpHEm7b6IaTRBlhItuaIOC7RkpJdLkaYv1SjtDZ6g2To6iSLW mUTtquH37xeR+yXnor5SjoDdloAzD+UeXL+4GhMvI0y6s0BjQUh3KZrNO8S4zNrUdgblt9kx1UR S X-Google-Smtp-Source: AGHT+IECwhHm8hkeK1ZzDPCdT+VYTSe+bLH+52gEz8Ds3fCi49EfRoUVrdLDSh9zogpkFeDv9vT7rg== X-Received: by 2002:a05:6a00:22cd:b0:6e5:43b5:953b with SMTP id d2e1a72fcca58-7024780448bmr3415564b3a.14.1717187318402; Fri, 31 May 2024 13:28:38 -0700 (PDT) Received: from grind.dc1.ventanamicro.com (189-69-160-78.dial-up.telesp.net.br. [189.69.160.78]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242b09133sm1819691b3a.178.2024.05.31.13.28.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:28:38 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, apatel@ventanamicro.com, ajones@ventanamicro.com, conor@kernel.org, Daniel Henrique Barboza Subject: [PATCH v2 7/8] hw/riscv/virt.c: imsics DT: add 'qemu, imsics' to 'compatible' Date: Fri, 31 May 2024 17:27:58 -0300 Message-ID: <20240531202759.911601-8-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240531202759.911601-1-dbarboza@ventanamicro.com> References: <20240531202759.911601-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=dbarboza@ventanamicro.com; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The DT docs for riscv,imsics [1] predicts a 'qemu,imsics' enum in the 'compatible' property. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,imsics.yaml Reported-by: Conor Dooley Fixes: 28d8c281200f ("hw/riscv: virt: Add optional AIA IMSIC support to virt machine") Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 56d7e945c6..ac70993679 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -515,6 +515,9 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, uint32_t imsic_max_hart_per_socket, imsic_addr, imsic_size; g_autofree uint32_t *imsic_cells = NULL; g_autofree uint32_t *imsic_regs = NULL; + static const char * const imsic_compat[2] = { + "qemu,imsics", "riscv,imsics" + }; imsic_cells = g_new0(uint32_t, ms->smp.cpus * 2); imsic_regs = g_new0(uint32_t, socket_count * 4); @@ -541,7 +544,10 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, imsic_name = g_strdup_printf("/soc/interrupt-controller@%lx", (unsigned long)base_addr); qemu_fdt_add_subnode(ms->fdt, imsic_name); - qemu_fdt_setprop_string(ms->fdt, imsic_name, "compatible", "riscv,imsics"); + qemu_fdt_setprop_string_array(ms->fdt, imsic_name, "compatible", + (char **)&imsic_compat, + ARRAY_SIZE(imsic_compat)); + qemu_fdt_setprop_cell(ms->fdt, imsic_name, "#interrupt-cells", FDT_IMSIC_INT_CELLS); qemu_fdt_setprop(ms->fdt, imsic_name, "interrupt-controller", NULL, 0); From patchwork Fri May 31 20:27:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 13682134 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5BA28C27C4F for ; Fri, 31 May 2024 20:31:31 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD8ry-00032P-QZ; Fri, 31 May 2024 16:28:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD8rw-0002zM-LA for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:56 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD8rk-0000qP-Mu for qemu-devel@nongnu.org; Fri, 31 May 2024 16:28:56 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-70255d5ddb8so17390b3a.0 for ; Fri, 31 May 2024 13:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1717187322; x=1717792122; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BYrjc36HQnGLnYOXBz0ofJERm3ikZWbOl25GmTHs5No=; b=WDf+n5KKbBGcqRgl/eVnmKX/3AziwoChUYzzVmq8Bv1QnNDDf89R+MZvD64L4eIcMm UacL3WQ6WInpW+9u+aMZuUaJJj6qy0MPQhkVjUYEMmZI66Zp/dzS1mR33OQcOsZnxmZs cfayXfe8H14XTJF8BIRe2DRchg8AHTgRNiyo9TViRKm0lZFCf7YlzdZmjiy+RpVRKtzj O/OJwZIwyDbmvJ7mHU2kDCcDsyc/mMF8ofMKxvJCBMhBWygiZK7e/NXcQX/1amQZWnPN CjKEpg/IiUE3laGeXw+lPULDrTgs/YcoQd3KkwDx3ZszFenSLTroTL58Nwc8BtJAtvzZ aaZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717187322; x=1717792122; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BYrjc36HQnGLnYOXBz0ofJERm3ikZWbOl25GmTHs5No=; b=J5rC8rua5cAvZFwGenXn8RQGK8Ov2LFlsLSFpj+bGltx49nKT+UQQJ36AIJUvYMl2T PRVclJOzgN7C+RPKhVqx17EdSqXPkb2Jv4yaK4W/h2zlSiTyOHCbkXavd5QgePrYEWzn p/OPnQ4i6y5UP14DfBSbNh0Yu5wG/eoXA2daHcxjvi0SDbAym7y5R0uN7Uy87uYgEUC0 zdT5zs3JMDMoYAyyryBqxIE2T+mL9VOinRecTV28X6ITajA6hO0cujK3w4Uynk2tqdpS vxcRGlbUKSr1yYLj4w1+Loi/9WusW7vHe4b0zFoRrLTxgdSleDp1w+QtaRP32G2m6Lwc g0Tg== X-Gm-Message-State: AOJu0YydBgfzy+xey0awpu2Zt1s0xKQ/QALDV4sW+pQLSDCdUYSlj3GB 1rfEEJW8xM/olji2UaBv8ejgzf6NAo6LmWEYYyoO5t4jaXT2vXKvpPu4tltkn66Swuisu/w8bqk G X-Google-Smtp-Source: AGHT+IFAAt2lWUzhgZcjqCJ7P7RV2AoRnIGFgQkoK/cklXD92mc7RbYg9V+76nxirfwJpSDL47bnXA== X-Received: by 2002:a05:6a21:2799:b0:1b1:f785:550b with SMTP id adf61e73a8af0-1b26f2cc9a7mr3108760637.38.1717187322686; Fri, 31 May 2024 13:28:42 -0700 (PDT) Received: from grind.dc1.ventanamicro.com (189-69-160-78.dial-up.telesp.net.br. [189.69.160.78]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242b09133sm1819691b3a.178.2024.05.31.13.28.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:28:42 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, apatel@ventanamicro.com, ajones@ventanamicro.com, conor@kernel.org, Daniel Henrique Barboza Subject: [PATCH v2 8/8] hw/riscv/virt.c: imsics DT: add '#msi-cells' Date: Fri, 31 May 2024 17:27:59 -0300 Message-ID: <20240531202759.911601-9-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240531202759.911601-1-dbarboza@ventanamicro.com> References: <20240531202759.911601-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=dbarboza@ventanamicro.com; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The DT docs for riscv,imsics [1] requires a 'msi-cell' property. Add one and set it zero. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,imsics.yaml Reported-by: Conor Dooley Fixes: 28d8c281200f ("hw/riscv: virt: Add optional AIA IMSIC support to virt machine") Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index ac70993679..8675c3a7d1 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -552,6 +552,7 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, FDT_IMSIC_INT_CELLS); qemu_fdt_setprop(ms->fdt, imsic_name, "interrupt-controller", NULL, 0); qemu_fdt_setprop(ms->fdt, imsic_name, "msi-controller", NULL, 0); + qemu_fdt_setprop_cell(ms->fdt, imsic_name, "#msi-cells", 0); qemu_fdt_setprop(ms->fdt, imsic_name, "interrupts-extended", imsic_cells, ms->smp.cpus * sizeof(uint32_t) * 2); qemu_fdt_setprop(ms->fdt, imsic_name, "reg", imsic_regs,