Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp951533rdb; Tue, 30 Jan 2024 03:49:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFSzz8j+dSpg4ArmBum2mX5F4WLzJXQmftOeb07BDiZpugcI1ThZwXMF+9ZVjgJSxUHqjZK X-Received: by 2002:ad4:576f:0:b0:68c:61af:e6bb with SMTP id r15-20020ad4576f000000b0068c61afe6bbmr1104181qvx.100.1706615379167; Tue, 30 Jan 2024 03:49:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706615379; cv=pass; d=google.com; s=arc-20160816; b=VKCt8pT/6Gav5bP/TzLZ9gRFokUaJHjYuN6iVZFDo/4XnxcWpKrtM3ShaYzb9Tc3E8 ocx+B3W+duVuQYsZI+JKmeB9UekhU80wwl+gx9VkA3SAjjDpnqwYfp/lHpB9y4o90lnk AqWUYkXOsh23WB4HGckEPnQXsVGzbDduOl2p0JU1J37HNWXN/zxmgOKWhEBzXRBHQs1W HXxHUGnpc6MdYhgRiM0uDfnvZPOhY/hh3PU8RwDCut0PkIYnrx2KoIKORJKp7cJV9L+i IwcgfMP+XQDLcfxsOOAMlrnaD6FX+X2XhJyNWq48K6MFbOEIhfYXuadj0i3JT1IrdZAa DFow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=ZOcGeSda17XAMn3ZiGQU9wovJtTh1U0y5+UoExVaW80=; fh=HnfsOTxl37B17MrABL8pqAX6uHYSqDh2XRcNOgN5Exw=; b=KPJgTXdP2ZUPl6cMqVWmbsTWGb2Wr6eyGtKWYHhj0rURHk2c4lUBdGoHXXKvU6vi85 bNq7L165xJ7UWgIg+SUmPrUGfl4z0k5pbjVDxRmgNtVF3riLFzgPojSMxSBIBsS4TYK1 P3ACwaqM6c/w+WumDtef5SyQQ9HMFYTJvtgEC3wKWQl0EXtDI6XP20e9/yZPz2fbWh0f T7MukeSbXYnMyH4w0zSwByV4alMTxLVGwn1CPourE1qwIQGG/drd87UbngfZscym3J4P rlzDTKjBRigQMtnYTAx9H7jUcAI9rUmWXg3nBswzC4P6+8Y1vNmz59tiolnlZbyoxzDM cY+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GueB1uq5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-44547-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44547-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s8-20020a0562140ca800b0068c37e05aaesi8266209qvs.253.2024.01.30.03.49.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 03:49:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44547-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GueB1uq5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-44547-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44547-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DD4CA1C25F10 for ; Tue, 30 Jan 2024 11:49:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2B9B6A34C; Tue, 30 Jan 2024 11:46:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GueB1uq5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0E526BB2C; Tue, 30 Jan 2024 11:46:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706615180; cv=none; b=I1U4FqpLzarprCW03wiRa0oqhseUSO6reuU2miZm+36mlPfE0kxHMhRG6c0Qd20KwsXXXbSkx/W/dHNDoqlEJnRq303DHd04ZKHIkt0fbNtJrPyEVmxsofyBpG+D7Ht322IHMWnbwe0xYcjzQN+mVgarW8LgmbwiXWvlHD4vQBM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706615180; c=relaxed/simple; bh=06r+eoDIdb0wUNK9nK1o7FDcwKFdTlsuHuRKweLT1c4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=TP1WCV2mqilf35Y8LGnCFcXHh/DLBOR2L72iiLQMsgvQZc4EzZv3C9CKO9Bh4/0y9BBc9SIlW5qO5eu3gMSiostjPt2uRiX65JrdnQxucCUg96360oifWSOs11N7VgeLxiKSmnvLkHxdMMWqpDuVJj3nORGsDyyWyEu5BzdeKos= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GueB1uq5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08963C43390; Tue, 30 Jan 2024 11:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706615179; bh=06r+eoDIdb0wUNK9nK1o7FDcwKFdTlsuHuRKweLT1c4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=GueB1uq5VGej0m02UI0z6szNNF68tqP4GszcsjFOcw63xgdIneA5HtrM61SmR5G1N qktGiqME3S+1Y0PEjqFDj2Zvdm79wGhhUtSSuFxc0uoOpNSKAND8GN5r5D6VctVrr6 FtcA34kp6rgV7zHn510vSmqNLGCns4S6qh6Jb27so0QrVL+oYtx4Bi2IOGBAa8qA6q +kWsj9IQAi9WRO0/wSuiQrI/c+QXXREzkPQW5h/Qffj00WPpkb0+WNxE2omlQE1qU8 T3KZuavUIGgRulenfQ+iDBYvihanGQ9iUUVyG4mjOMkxyMD5HuylFg899ls+EkKVg2 yxxXuoVZgb60A== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Anup Patel Cc: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Frank Rowand , Conor Dooley , devicetree@vger.kernel.org, Saravana Kannan , Marc Zyngier , Anup Patel , linux-kernel@vger.kernel.org, Atish Patra , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Andrew Jones Subject: Re: [PATCH v12 00/25] Linux RISC-V AIA Support In-Reply-To: References: <20240127161753.114685-1-apatel@ventanamicro.com> <87r0hzuw87.fsf@all.your.base.are.belong.to.us> <87le87uulb.fsf@all.your.base.are.belong.to.us> Date: Tue, 30 Jan 2024 12:46:16 +0100 Message-ID: <87cytjvybb.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Anup Patel writes: > On Tue, Jan 30, 2024 at 1:22=E2=80=AFPM Bj=C3=B6rn T=C3=B6pel wrote: >> >> Bj=C3=B6rn T=C3=B6pel writes: >> >> > Anup Patel writes: >> > >> >> The RISC-V AIA specification is ratified as-per the RISC-V internatio= nal >> >> process. The latest ratified AIA specifcation can be found at: >> >> https://github.com/riscv/riscv-aia/releases/download/1.0/riscv-interr= upts-1.0.pdf >> >> >> >> At a high-level, the AIA specification adds three things: >> >> 1) AIA CSRs >> >> - Improved local interrupt support >> >> 2) Incoming Message Signaled Interrupt Controller (IMSIC) >> >> - Per-HART MSI controller >> >> - Support MSI virtualization >> >> - Support IPI along with virtualization >> >> 3) Advanced Platform-Level Interrupt Controller (APLIC) >> >> - Wired interrupt controller >> >> - In MSI-mode, converts wired interrupt into MSIs (i.e. MSI genera= tor) >> >> - In Direct-mode, injects external interrupts directly into HARTs >> >> >> >> For an overview of the AIA specification, refer the AIA virtualization >> >> talk at KVM Forum 2022: >> >> https://static.sched.com/hosted_files/kvmforum2022/a1/AIA_Virtualizat= ion_in_KVM_RISCV_final.pdf >> >> https://www.youtube.com/watch?v=3Dr071dL8Z0yo >> >> >> >> To test this series, use QEMU v7.2 (or higher) and OpenSBI v1.2 (or h= igher). >> >> >> >> These patches can also be found in the riscv_aia_v12 branch at: >> >> https://github.com/avpatel/linux.git >> >> >> >> Changes since v11: >> >> - Rebased on Linux-6.8-rc1 >> >> - Included kernel/irq related patches from "genirq, irqchip: Convert= ARM >> >> MSI handling to per device MSI domains" series by Thomas. >> >> (PATCH7, PATCH8, PATCH9, PATCH14, PATCH16, PATCH17, PATCH18, PATCH= 19, >> >> PATCH20, PATCH21, PATCH22, PATCH23, and PATCH32 of >> >> https://lore.kernel.org/linux-arm-kernel/20221121135653.208611233= @linutronix.de/) >> >> - Updated APLIC MSI-mode driver to use the new WIRED_TO_MSI mechanis= m. >> >> - Updated IMSIC driver to support per-device MSI domains for PCI and >> >> platform devices. >> > >> > Thanks for working on this, Anup! I'm still reviewing the patches. >> > >> > I'm hitting a boot hang in text patching, with this series applied on >> > 6.8-rc2. IPI issues? >> >> Not text patching! One cpu spinning in smp_call_function_many_cond() and >> the others are in cpu_relax(). Smells like IPI... > > I tried bootefi from U-Boot multiple times but can't reproduce the > issue you are seeing. Thanks! I can reproduce without EFI, and simpler command-line: qemu-system-riscv64 \ -bios /path/to/fw_dynamic.bin \ -kernel /path/to/Image \ -append 'earlycon console=3Dtty0 console=3DttyS0' \ -machine virt,aia=3Daplic-imsic \ -no-reboot -nodefaults -nographic \ -smp 4 \ -object rng-random,filename=3D/dev/urandom,id=3Drng0 \ -device virtio-rng-device,rng=3Drng0 \ -m 4G -chardev stdio,id=3Dchar0 -serial chardev:char0 I can reproduce with your upstream riscv_aia_v12 plus the config in the gist [1], and all latest QEMU/OpenSBI: QEMU: 11be70677c70 ("Merge tag 'pull-vfio-20240129' of https://github.com/l= egoater/qemu into staging") OpenSBI: bb90a9ebf6d9 ("lib: sbi: Print number of debug triggers found") Linux: d9b9d6eb987f ("MAINTAINERS: Add entry for RISC-V AIA drivers") Removing ",aia=3Daplic-imsic" from the CLI above completes the boot (i.e. panicking about missing root mount ;-)) Bj=C3=B6rn [1] https://gist.githubusercontent.com/bjoto/bac563e6dcaab68dba1a5eaf675d51= aa/raw/ff6208fb17f27819dbe97ace7d034f385d2db657/gistfile1.txt