Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2225767/?format=api
{ "id": 2225767, "url": "http://patchwork.ozlabs.org/api/patches/2225767/?format=api", "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260421145451.1597930-4-guoren@kernel.org/", "project": { "id": 70, "url": "http://patchwork.ozlabs.org/api/projects/70/?format=api", "name": "Linux KVM RISC-V", "link_name": "kvm-riscv", "list_id": "kvm-riscv.lists.infradead.org", "list_email": "kvm-riscv@lists.infradead.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "http://lists.infradead.org/pipermail/kvm-riscv/", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260421145451.1597930-4-guoren@kernel.org>", "list_archive_url": null, "date": "2026-04-21T14:54:50", "name": "[3/3] irqchip/riscv-imsic: Remove global nr_guest_files after KVM AIA per-HART conversion", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1994ea6fcd9e57fb2fea0015e84c81674802888f", "submitter": { "id": 75626, "url": "http://patchwork.ozlabs.org/api/people/75626/?format=api", "name": "Guo Ren", "email": "guoren@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260421145451.1597930-4-guoren@kernel.org/mbox/", "series": [ { "id": 500831, "url": "http://patchwork.ozlabs.org/api/series/500831/?format=api", "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/list/?series=500831", "date": "2026-04-21T14:54:47", "name": "RISC-V: KVM: AIA: Convert HGEI management to fully per-HART", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500831/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2225767/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2225767/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Ptqw5ZCJ;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=hp74uKbb;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0QQh73kZz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 00:55:56 +1000 (AEST)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wFCW3-00000008n8T-24KF;\n\tTue, 21 Apr 2026 14:55:55 +0000", "from sea.source.kernel.org ([172.234.252.31])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wFCW1-00000008n7C-0Mp4;\n\tTue, 21 Apr 2026 14:55:54 +0000", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby sea.source.kernel.org (Postfix) with ESMTP id 6735E4050F;\n\tTue, 21 Apr 2026 14:55:52 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 9A0E6C2BCB3;\n\tTue, 21 Apr 2026 14:55:48 +0000 (UTC)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=hGKtw22mNG4IdmK+tH2Gajl8Jvrr9bOczCjhBl2A3CE=; b=Ptqw5ZCJ6INBXU\n\txNUTdMrDCWGmp/gbCuzcaqV2P93itPxrdagX4vNFFkMsDZvPG0mrPjps0O+LZ8YOE/Mew5XqoMe+Y\n\th9jlrQWBWoJFT8sIXUcQkWl57ERAohNj+fvlizNXmcEiFltaTlNJh67OQy0/tBXLjjVZ18CwWdu6B\n\twBhhRPn7PEDECm3Tzm5P6siCewDFJCpnVlq6AgDWZJtcObgVdEP498J+/th4PQT0AT3xohyACNjxY\n\tOEOkQcqzbNSxvH7AiZXSdgpmoq9q1ei8pZjL0YrExMmh68bM2Q9b1R7T1E4J6Dn0lw9AwMO2I/E4C\n\tfYyXYyFnv1Z6m2UPJp6g==;", "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1776783352;\n\tbh=LzybNtmwcAXgm9BgLJOpSrnqzmHYslQqL5sDqIK9kPQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=hp74uKbbIdji4/h2Sqr21wnLG49d9FJCzpazfT0b0VVLIrhZbyv4sVl0ENuncTPjI\n\t u4T8qXRDy35xN+TUMmAsw2qeG0pMa9h1tkGuk6jZOCLsvTt/gcSFUMetZIYi5PxW+Q\n\t 5uBqN/TCaalGNMuJh18NcQ5zTQu9ISR/3mAcqZJU3dJl9k7QGYI2q+KMnGAMmDCCBD\n\t R7RjLHj0xhgVkNn62O+uy8Q69Vclrkwv2Ta4ou9JubWwvb+YniN+hJYYURQDbEwjWZ\n\t yRdvZaiYy6+xxfjntrAb6m6YcbSEI93gQx7J4Gh6Qhuv3MICpZv02FBvpi4guGfsP5\n\t 78AKlIKP7DacA==" ], "From": "guoren@kernel.org", "To": "fangyu.yu@linux.alibaba.com,\n\tcp0613@linux.alibaba.com,\n\tinochiama@gmail.com,\n\tme@ziyao.cc,\n\tgaohan@iscas.ac.cn,\n\tanup@brainfault.org,\n\tatish.patra@linux.dev,\n\tpjw@kernel.org,\n\tpalmer@dabbelt.com,\n\talex@ghiti.fr,\n\ttglx@kernel.org,\n\tAlbert Ou <aou@eecs.berkeley.edu>", "Cc": "kvm-riscv@lists.infradead.org,\n\tkvm@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\t\"Guo Ren (Alibaba DAMO Academy)\" <guoren@kernel.org>,\n\tlinux-riscv@lists.infradead.org", "Subject": "[PATCH 3/3] irqchip/riscv-imsic: Remove global nr_guest_files after\n KVM AIA per-HART conversion", "Date": "Tue, 21 Apr 2026 10:54:50 -0400", "Message-Id": "<20260421145451.1597930-4-guoren@kernel.org>", "X-Mailer": "git-send-email 2.40.1", "In-Reply-To": "<20260421145451.1597930-1-guoren@kernel.org>", "References": "<20260421145451.1597930-1-guoren@kernel.org>", "MIME-Version": "1.0", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260421_075553_227677_40A1A831 ", "X-CRM114-Status": "GOOD ( 13.97 )", "X-Spam-Score": "-2.1 (--)", "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n the administrator of that system for details.\n Content preview: From: \"Guo Ren (Alibaba DAMO Academy)\" <guoren@kernel.org>\n With the recent KVM AIA changes, HGEI line management is now fully per-CPU\n (via struct aia_hgei_control::nr_hgei) and the global\n kvm_riscv_aia_nr_hgei\n has been replaced by a simple enabled flag. The I [...]\n Content analysis details: (-2.1 points, 5.0 required)\n pts rule name description\n ---- ----------------------\n --------------------------------------------------\n -0.0 SPF_PASS SPF: sender matches SPF record\n 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from\n envelope-from domain\n -0.1 DKIM_VALID Message has at least one valid DKIM or DK\n signature\n -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n author's\n domain\n 0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n [score: 0.0000]\n -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender", "X-BeenThere": "kvm-riscv@lists.infradead.org", "X-Mailman-Version": "2.1.34", "Precedence": "list", "List-Id": "<kvm-riscv.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/kvm-riscv>,\n <mailto:kvm-riscv-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/kvm-riscv/>", "List-Post": "<mailto:kvm-riscv@lists.infradead.org>", "List-Help": "<mailto:kvm-riscv-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/kvm-riscv>,\n <mailto:kvm-riscv-request@lists.infradead.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"kvm-riscv\" <kvm-riscv-bounces@lists.infradead.org>", "Errors-To": "kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "From: \"Guo Ren (Alibaba DAMO Academy)\" <guoren@kernel.org>\n\nWith the recent KVM AIA changes, HGEI line management is now fully\nper-CPU (via struct aia_hgei_control::nr_hgei) and the global\nkvm_riscv_aia_nr_hgei has been replaced by a simple enabled flag.\nThe IMSIC driver no longer needs to compute and enforce a global\nminimum number of guest interrupt files across all HARTs.\n\nRemove:\n - `u32 nr_guest_files` from `struct imsic_global_config`\n - the initial `BIT(global->guest_index_bits) - 1` assignment\n - the entire per-CPU MMIO-based min() calculation and its comment\n (which was specifically there to protect old KVM)\n\nThe per-HART guest file count is already handled locally in\n`imsic_local_config` during the parent IRQ loop, so this global\nfield was redundant.\n\nThis completes the cleanup series, eliminates the last global\nassumption about guest files, and improves support for heterogeneous\n(big.LITTLE / multi-vendor) RISC-V platforms.\n\nSigned-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org>\n---\n drivers/irqchip/irq-riscv-imsic-state.c | 12 +-----------\n include/linux/irqchip/riscv-imsic.h | 3 ---\n 2 files changed, 1 insertion(+), 14 deletions(-)", "diff": "diff --git a/drivers/irqchip/irq-riscv-imsic-state.c b/drivers/irqchip/irq-riscv-imsic-state.c\nindex e3ed874d89e7..fef27247a34f 100644\n--- a/drivers/irqchip/irq-riscv-imsic-state.c\n+++ b/drivers/irqchip/irq-riscv-imsic-state.c\n@@ -784,7 +784,7 @@ static int __init imsic_parse_fwnode(struct fwnode_handle *fwnode,\n \n int __init imsic_setup_state(struct fwnode_handle *fwnode, void *opaque)\n {\n-\tu32 i, j, index, nr_parent_irqs, nr_mmios, nr_guest_files, nr_handlers = 0;\n+\tu32 i, j, index, nr_parent_irqs, nr_mmios, nr_handlers = 0;\n \tstruct imsic_global_config *global;\n \tstruct imsic_local_config *local;\n \tvoid __iomem **mmios_va = NULL;\n@@ -878,7 +878,6 @@ int __init imsic_setup_state(struct fwnode_handle *fwnode, void *opaque)\n \t}\n \n \t/* Configure handlers for target CPUs */\n-\tglobal->nr_guest_files = BIT(global->guest_index_bits) - 1;\n \tfor (i = 0; i < nr_parent_irqs; i++) {\n \t\trc = imsic_get_parent_hartid(fwnode, i, &hartid);\n \t\tif (rc) {\n@@ -919,15 +918,6 @@ int __init imsic_setup_state(struct fwnode_handle *fwnode, void *opaque)\n \t\tlocal->msi_pa = mmios[index].start + reloff;\n \t\tlocal->msi_va = mmios_va[index] + reloff;\n \n-\t\t/*\n-\t\t * KVM uses global->nr_guest_files to determine the available guest\n-\t\t * interrupt files on each CPU. Take the minimum number of guest\n-\t\t * interrupt files across all CPUs to avoid KVM incorrectly allocating\n-\t\t * an unexisted or unmapped guest interrupt file on some CPUs.\n-\t\t */\n-\t\tnr_guest_files = (resource_size(&mmios[index]) - reloff) / IMSIC_MMIO_PAGE_SZ - 1;\n-\t\tglobal->nr_guest_files = min(global->nr_guest_files, nr_guest_files);\n-\n \t\tnr_handlers++;\n \t}\n \ndiff --git a/include/linux/irqchip/riscv-imsic.h b/include/linux/irqchip/riscv-imsic.h\nindex 4b348836de7a..7f3ff5c5ea53 100644\n--- a/include/linux/irqchip/riscv-imsic.h\n+++ b/include/linux/irqchip/riscv-imsic.h\n@@ -68,9 +68,6 @@ struct imsic_global_config {\n \t/* Number of guest interrupt identities */\n \tu32\t\t\t\t\tnr_guest_ids;\n \n-\t/* Number of guest interrupt files per core */\n-\tu32\t\t\t\t\tnr_guest_files;\n-\n \t/* Per-CPU IMSIC addresses */\n \tstruct imsic_local_config __percpu\t*local;\n };\n", "prefixes": [ "3/3" ] }