{"id":2229998,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2229998/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260429044752.4176397-22-alistair.francis@wdc.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.1/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260429044752.4176397-22-alistair.francis@wdc.com>","date":"2026-04-29T04:47:22","name":"[PULL,21/51] hw/riscv/riscv-iommu: Add IPSR.PMIP RW1C support","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"29b3d276d089d41c78b5ec6558059c8df41cb372","submitter":{"id":64571,"url":"http://patchwork.ozlabs.org/api/1.1/people/64571/?format=json","name":"Alistair Francis","email":"alistair23@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260429044752.4176397-22-alistair.francis@wdc.com/mbox/","series":[{"id":501983,"url":"http://patchwork.ozlabs.org/api/1.1/series/501983/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501983","date":"2026-04-29T04:47:05","name":"[PULL,01/51] hw/riscv/riscv-iommu: Use standard EN_PRI bit for PRI","version":1,"mbox":"http://patchwork.ozlabs.org/series/501983/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2229998/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2229998/checks/","tags":{},"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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 unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=YhuOmwpP;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g54cj3HK9z1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 14:50:45 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wHws3-00041a-LD; Wed, 29 Apr 2026 00:49:59 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <alistair23@gmail.com>)\n id 1wHws2-0003q8-DL\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 00:49:58 -0400","from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <alistair23@gmail.com>)\n id 1wHws0-00007c-Tm\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 00:49:58 -0400","by mail-pl1-x631.google.com with SMTP id\n d9443c01a7336-2b2503753efso125122475ad.0\n for <qemu-devel@nongnu.org>; Tue, 28 Apr 2026 21:49:56 -0700 (PDT)","from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b988772ae8sm7756145ad.7.2026.04.28.21.49.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Apr 2026 21:49:55 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777438195; x=1778042995; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=hxLLYH9MzoUJ2vk/paiI+vtwF1wl9GSiiqD56bk7rlg=;\n b=YhuOmwpPEdGml56UBOnB6aAfsMKsfBj0wWYkBksJp/hezPNkfOWQQ3vObSArOLSiBU\n aAWcL6LMG73PYohLNtEt/8TqmB8CIP8VJ5QSftSiTxOELEGTPlc4IxkLBgosvdBJ1tv/\n J9VZsmAxYpGJaXbHZ7YcZBYqDU/95gOhiAabZ+q3bvXqqRJ7aI/l/9LcblYh33NqXq0Q\n 5/6t5IJJMweAYNErKv5W2hk0hYQCApCQUUmgK/Tzp1+wiAn+lsR42j9lybTLifqViqEl\n tigAxl+WbXU3/x8UuBSsV0PLcNQQjABatEqfQd1wuRzSh9WBlI+wB6ZINf6F0hJRGpnj\n vt0A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777438195; x=1778042995;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=hxLLYH9MzoUJ2vk/paiI+vtwF1wl9GSiiqD56bk7rlg=;\n b=eXCI14iqPbmiF13G5/LQHMtqwSgdZmmryIuMfV8eXptPCB/jgoQ73f9ytxILsaWisk\n u+bCBhqlLmL2RbifeTUVls+vZE+rD4xPZQKWv+B2IHRX+zNJtf9U5icmdbRD+MA78CSu\n XLz5sQqsnCPsZkgsAfsWnY1I2e8FVfmD3RisyGWChMC7ozse53eWQIqXYVsdOPZJZy6w\n iIWWWc25zros7i5rnvB4O2b/ZQFndRq48pfvk3gylGyxo6B1ZlpRHZcAx08lXWHIFLna\n PPoKndBv5OZj7kJbWcr9UV99g9sY50OQspm/vmAzNUrPFBnDcWTYjoXGe/CDtDwgnEMN\n QU7g==","X-Forwarded-Encrypted":"i=1;\n AFNElJ92FLc5c+heI5t7GoP4uOz/Ptfw+PnIUSR80trJTH/OVqICDLlyPiRxehn1TIgr+cvVsJ3quPvZuuih@nongnu.org","X-Gm-Message-State":"AOJu0Yyv4s7NTCYFze+tk17ygqmr6nW9Mb6QE/toI3z2Pp/7ZoJKXSkD\n o/KTdqcQo0FSMypG/Pc3z+6vEx/pLMiklTA7g2fyWU8VIjxVukWAupAk","X-Gm-Gg":"AeBDieukMD/9WykOqABW0HJ9CDZea6hH+7wP8WCu4CbjOJgDmWq50dwV34/RAvA9TjV\n 0StkvwAW6bnd5JwPEX7iVDham66iFYwQexySpyjyzobSR2ZYwPmE3hsKo6+ZZPDhuStGMTfvGws\n 8zmLYvSZKamjCNmkZsD6pYUkO5faAMXsywkmfhfQodY9vnvl6sFHtKUU708LQUMkkRXzVdY9ObJ\n je3b08Lj2uHmhE/uIe/T9lwnr5oTordDx+AO/yOaoDEgzbHWJ1jRafd8hb8lmQSP0benkIIvYt7\n cZkf12u22FvZSmIDGu0IHUpNSWvehb2EIQLIkim+pSxwbhiha8oCE6CEPZvTTZ2zrQSPWydvCEz\n F1xBvc8APeQ3y4k/2gtyMuAygE4GCitS7/1ofO6L0geM/TFhHinX5uU9eUNcN8+tPK4ZpNr6MNs\n Xkd/0AABfhclGXm5QHrWWCHjIR/bN8YqnyAUTUdllPJsCrGhS/SNevFww0odq9YRo=","X-Received":"by 2002:a17:903:2c9:b0:2b2:42da:25cb with SMTP id\n d9443c01a7336-2b97c4aa15cmr56774395ad.19.1777438195628;\n Tue, 28 Apr 2026 21:49:55 -0700 (PDT)","From":"alistair23@gmail.com","X-Google-Original-From":"alistair.francis@wdc.com","To":"palmer@dabbelt.com, liwei1518@gmail.com, daniel.barboza@oss.qualcomm.com,\n zhiwei_liu@linux.alibaba.com, chao.liu.zevorn@gmail.com,\n qemu-riscv@nongnu.org, qemu-devel@nongnu.org","Cc":"alistair23@gmail.com, Jay Chang <jay.chang@sifive.com>,\n Frank Chang <frank.chang@sifive.com>, Nutty Liu <nutty.liu@hotmail.com>,\n Alistair Francis <alistair.francis@wdc.com>","Subject":"[PULL 21/51] hw/riscv/riscv-iommu: Add IPSR.PMIP RW1C support","Date":"Wed, 29 Apr 2026 14:47:22 +1000","Message-ID":"<20260429044752.4176397-22-alistair.francis@wdc.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260429044752.4176397-1-alistair.francis@wdc.com>","References":"<20260429044752.4176397-1-alistair.francis@wdc.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=2607:f8b0:4864:20::631;\n envelope-from=alistair23@gmail.com; helo=mail-pl1-x631.google.com","X-Spam_score_int":"-17","X-Spam_score":"-1.8","X-Spam_bar":"-","X-Spam_report":"(-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 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":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"From: Jay Chang <jay.chang@sifive.com>\n\nAdd proper RW1C (Read/Write 1 to Clear) support for the IPSR.PMIP\n(Performance Monitor Interrupt Pending) bit, which was missing from\nthe IPSR register implementation.\n\nSigned-off-by: Jay Chang <jay.chang@sifive.com>\nReviewed-by: Frank Chang <frank.chang@sifive.com>\nReviewed-by: Nutty Liu <nutty.liu@hotmail.com>\nReviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>\nMessage-ID: <20260325050011.66722-3-jay.chang@sifive.com>\nSigned-off-by: Alistair Francis <alistair.francis@wdc.com>\n---\n hw/riscv/riscv-iommu-bits.h | 1 +\n hw/riscv/riscv-iommu.c      | 4 ++++\n 2 files changed, 5 insertions(+)","diff":"diff --git a/hw/riscv/riscv-iommu-bits.h b/hw/riscv/riscv-iommu-bits.h\nindex 47fe01bee5..a938fd3eb4 100644\n--- a/hw/riscv/riscv-iommu-bits.h\n+++ b/hw/riscv/riscv-iommu-bits.h\n@@ -189,6 +189,7 @@ enum riscv_iommu_ddtp_modes {\n #define RISCV_IOMMU_REG_IPSR            0x0054\n #define RISCV_IOMMU_IPSR_CIP            BIT(0)\n #define RISCV_IOMMU_IPSR_FIP            BIT(1)\n+#define RISCV_IOMMU_IPSR_PMIP           BIT(2)\n #define RISCV_IOMMU_IPSR_PIP            BIT(3)\n \n enum {\ndiff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c\nindex 8476405d0e..7ba3240552 100644\n--- a/hw/riscv/riscv-iommu.c\n+++ b/hw/riscv/riscv-iommu.c\n@@ -2150,6 +2150,10 @@ static void riscv_iommu_update_ipsr(RISCVIOMMUState *s, uint64_t data)\n         ipsr_clr |= RISCV_IOMMU_IPSR_FIP;\n     }\n \n+    if (!(data & RISCV_IOMMU_IPSR_PMIP)) {\n+        ipsr_clr |= RISCV_IOMMU_IPSR_PMIP;\n+    }\n+\n     if (data & RISCV_IOMMU_IPSR_PIP) {\n         pqcsr = riscv_iommu_reg_get32(s, RISCV_IOMMU_REG_PQCSR);\n \n","prefixes":["PULL","21/51"]}