From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962782; cv=none; d=zohomail.com; s=zohoarc; b=cHF4AJbxsLqDoJETaW14/5Fez4UhWqCWaPdxypWfxoz2OSfuvJbvcQHwV39eoLo4aCqYy/m7Z23232gToPZG+r13bbUu0keMD2QiGaPvh8xi67lG1D9DGurH1i5pcJCE8KQe2JGbKhaAxq/c+Szr7ZChM0uP7dWiT04vP9CpQY8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962782; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=J8bQ3jishH1zGhp+/htrMFXAohWixgT0dPpSDIofuiE=; b=h+yY4/WBt8a2nacbAXZN612rbNLUZO78RBN83UoG5ZHlZ33MxcznxdTBSxpDGvk+jwhUrcV85gFkTUX4UFibkUQ07wCT57XdUKF2di7G7Z3MJZzpS7mTBEPR4Q0xqPxb5px5nGDaNx/UEgvF7dTNhLkaKy8sI2Wz7zl+NtJUhNU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962782759816.1523025185888; Thu, 19 Mar 2026 16:26:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3MkJ-0000UI-7w; Thu, 19 Mar 2026 19:25:43 -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 1w3MkI-0000U6-5b for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:42 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3MkG-0007aI-LD for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:41 -0400 Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-354a18c48b5so1036941a91.1 for ; Thu, 19 Mar 2026 16:25:40 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.25.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962739; x=1774567539; 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=J8bQ3jishH1zGhp+/htrMFXAohWixgT0dPpSDIofuiE=; b=HYnb+iioXdeje6Hb8RcwkOTAgpKe/iTVT8cIKdUxy0Gq3oG6PzeyhVhgAhasKFWyy5 +CIJ8BajBLKSvVAsf5YmC9CQqgYP6KCjGpg9Ih2mKwu+QYAN0Iyon4BCg8BRUt236SnG i8G1JIQL+M5SVvHAJDPDIRMeFG6O+XFjooqkIhBpauDiboF4ClOojgQsXSsOV7CqD7MD eZEvze0nZ94C+V3HUuh6eRTRjwzm9feMa1f0+FCdv6GtMgZRQadK5EV6gnCTICErjJOs +PBXy+56ITkNGNpYz/WI7alP3PfggZJESQxv9TSfxtbwrWNVcvuIqWFDNWVueCxwIUEI Ruvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962739; x=1774567539; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=J8bQ3jishH1zGhp+/htrMFXAohWixgT0dPpSDIofuiE=; b=pTvKdPFHEoZl+g+j9z7WEYLmH/R+yZQukbJ6sQ8pOrDwGbMF/4jSgxjMqHXEr18upp tYy5mEH6PQLCQZCI4u7vyJRllOCl8p8mJkmzb+2wALrshskHT4w7p7RjDeOD8BtkHHMy 9oW6guoR84Sf4uYtAFv6cMYCe6rGJK3pSiUbtti0XEP9t6ozjISxIjmirAtp6riAy95I bKn6Xjj737TOkdncS1Y+vovRG02ews7MMGS0IHxJAjZb1QbW4c5Wm41YTgLIRNF7epOj tyYeT8MpFcSqinkQJgMRPR2h+Blj0QIiWFsNqYAVu2zyFbzalzVmssG9/q8GRgWEzQOC rEBQ== X-Gm-Message-State: AOJu0YyPBLsQ0UcCVWcYqPfW5A1RKzbQ9HIwqK0dZuhCRBV1go+b+bb2 DQHEXNkFkCjpvE8EFfvZ9qPeV1dW+loKQhOIhXiY2ren5OrDCm8jzYQqaQ/0hQ== X-Gm-Gg: ATEYQzw2McxencSZPgOMT2TtLS4czlVJ4V8ZmyXPk9bLqeg5WjxgrY76bBy6i9om9YU 5hLiCGliOUiqONsWrEd7C7KSsesdrUoquzvql6hhngpHbm1Gn+sY54PROSXQeYOgB1JCEbUoqYt fSTuwtoHTMUPj3iUaaueh8dNsI3nuQQo/IrmY7X+H/eis2l0VLJD8dvE/YQLPdf2fDhVHj8oO+F GBsXzOCCUHLQxGSw1Ed1IwATo3iPfsrEuZ32TEobD6bKZyNXX1U2OiM4IzaxvRtTvNppqtzzM6s Bybmc3OFrBiwoi2NUpl21UP1d7qN5KMRyBqgj4db0oi8faj+sIfhcbTnFoLggAESQTIoa5LR5+X ZM5MXhe+4YU4YFvm3dTWwa4cRyH9nSVMjSrv55EIjYCKHmbPSYWOP0SuOztiitk3ZYqGdPwu9/L Ph0v56MPJF6mKVZbusKm26nGEnbrTe0KOOdCfJKnNyqQ== X-Received: by 2002:a17:902:d48b:b0:2b0:5fbe:12ff with SMTP id d9443c01a7336-2b082793befmr7665025ad.30.1773962738647; Thu, 19 Mar 2026 16:25:38 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Djordje Todorovic , Djordje Todorovic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alistair Francis Subject: [PULL 01/17] hw/riscv: Fix integer overflow in cm_base calculation Date: Fri, 20 Mar 2026 09:25:06 +1000 Message-ID: <20260319232522.1867400-2-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=alistair23@gmail.com; helo=mail-pj1-x1034.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962783957158500 From: Djordje Todorovic Ensure 64-bit arithmetic is used when computing cm_base, avoiding potential integer overflow. Resolves: Coverity CID 1644076 Signed-off-by: Djordje Todorovic Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260115130110.2825796-2-djordje.todorovic@htecgroup.com> Signed-off-by: Alistair Francis --- include/hw/riscv/cps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/riscv/cps.h b/include/hw/riscv/cps.h index f33fd7ac86..39029bca8f 100644 --- a/include/hw/riscv/cps.h +++ b/include/hw/riscv/cps.h @@ -27,7 +27,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(RISCVCPSState, RISCV_CPS) /* The global CM base for the boston-aia model. */ #define GLOBAL_CM_BASE 0x16100000 /* The CM block is 512 KiB. */ -#define CM_SIZE (1 << 19) +#define CM_SIZE (1ULL << 19) =20 /* * The mhartid bits has cluster at bit 16, core at bit 4, and hart at --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962782; cv=none; d=zohomail.com; s=zohoarc; b=EGeV0yJgO8YYzoA/EhdSe6JDQ8blVZnIAZXfqy4sN6cOuTpXRI+lNuGP8uYJRNJ4GFhbjNNMcLKnLJhxB61WAQUpp316Q/OIajXTpQpF9Qrmm+D7PJfJgATiPJpd8kSup6/SkISO+v4XydcJBsd4Nq4jTU6atVSS9OCVQmU0z4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962782; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=V1wYAQxZ7DlIgdL+YHHsLWfcTy3c3+OooLp3tGYj2ZQ=; b=h16y0ADfC0NvqL2ohMcIOX5iMusvWVNtlsChXC2eIBMQRTz2/9vyWXa23Lc3IGFvxs9UZshjALEAUzfqpgjG7BA++32p97V/KPtA60eUNVsWPg0dUbBrK/TUePGBaaZLV271MQmsL9JD9/BiK/WX+DiL06k29smLEiNd5EHUDwc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962782731706.7825616060188; Thu, 19 Mar 2026 16:26:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3MkN-0000an-OI; Thu, 19 Mar 2026 19:25: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 1w3MkM-0000XG-1G for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:46 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3MkK-0007av-Ej for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:45 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2aaed195901so5237105ad.0 for ; Thu, 19 Mar 2026 16:25:44 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962742; x=1774567542; 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=V1wYAQxZ7DlIgdL+YHHsLWfcTy3c3+OooLp3tGYj2ZQ=; b=fkDbfveLMuDdR/IsKhC/75uxjbYFOXKhp80zfo+40Afnx3mjRrv0vdJTv2kzSmrkJc oQJM2epxmBH6eEwIMUNf5CVCDWQO4QcPAOUU26lHDoRE35+r0QLLE7Kr9AUcCom5s5Cs 6gmGvI7ZSKzpZ3Kohxzwwsj68cIuZX9q0amY6MO8vbv7S+LQOWazm05BANk7dYtDhcAZ 88YNFvePL+dKguP4p5uWHlwY3dioOMp6eww6NjwYcS8MKKqhqehCXuUAC5UQ+7CfibFm tfZMZxY01uJgSYWVYgNtZKx9QjocIuk45eIx9XZ90bIf0wWLhxof256V0oFH0nRhy38/ PqJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962742; x=1774567542; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=V1wYAQxZ7DlIgdL+YHHsLWfcTy3c3+OooLp3tGYj2ZQ=; b=N+fGMZoTEzEmVs00n59oj67cbWRxzLFSUWwdkmuQ6R7oFKmNOFZpd1/CLVen3R+g4u 06O1GmK1T6y1ayQV+Kg/1OMzpiJ6wH1okDrkkf3HkBdwacIqvrfyyzep8ybB++knwgrj mIFvP/68dZ4CQVumIoFoIKG5wCu9hx+FGMuDZp++8fipLL/5/vxeMm5neFzhRnqS1SDs J67KSfXr8AEzUWn6MveQIAVG1zE3I8RVdoBm4PAh50N9QTBduzSjBGaIBiAdcBfaOFoS vtepDobYFl5NRLhBHX79FrRCcEC42fOnch7nEkswURlebYnj7Ua6fDmmrSyJZlgGZrci Jc3g== X-Gm-Message-State: AOJu0YxdlrKk4Pka98vI8Urm9C7ZzFtXqMj7vQb39vY16XWTjxV/UrjA zx9sFVwxp2/D4+7q3Ey/+VMEmKTaTwZx7BDj4KDUFfsURw/m5amAJEXVFTaotQ== X-Gm-Gg: ATEYQzxh0ClwPxZ3IT3tZ4zlhOovpKrrLFVQuV/8oTvLWCCpa8jfbiZHhdpjv1JcgaL JeZ9AYLLVXZw5r95qXDLk4wm/wSSnSJpvVwPnkniBeJMxFtKWiB2LjS7S7NhraDLGoK17XA/ORC 60bzv4qD83YyOXSgVqeVpDRcL7RmH1W0BPiif+HbCWFjzYyKQb29rXih/oeMZ2SWdohYyxp609o VTzd4F79ksDtYYOqqonLcCgucW2B4rdgm2giVsXr4ifKceiv01us0UVVMwKsIhYJfUSOhNwc868 zAPde4dbwO7iH9mcqyyw+hpeajy+PAHDZ7KpGKd6dVF5bv99gaDM8FrYMM4MNOtTzhiI3lYTs3x V0fCwzOjic4A3wh76V8sYhE+lq5X04f8GicT+SrHzo0CwP6Cvh2nxB+ClSwqQK7CWmkHwxZ59uE DHI9wmz/oUNRN3pfjYi2InA9ftri7yqcaAUMsqz2YfIQ== X-Received: by 2002:a17:903:38c7:b0:2ae:4a4e:1e25 with SMTP id d9443c01a7336-2b0827826aamr8716685ad.25.1773962742317; Thu, 19 Mar 2026 16:25:42 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Djordje Todorovic , Djordje Todorovic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alistair Francis Subject: [PULL 02/17] target/riscv: Fix null pointer dereference in cpu_set_exception_base Date: Fri, 20 Mar 2026 09:25:07 +1000 Message-ID: <20260319232522.1867400-3-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=alistair23@gmail.com; helo=mail-pl1-x629.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962783947158500 From: Djordje Todorovic Add missing return statement after logging the error when cs is NULL. Without this, the function continues to dereference the null pointer. Resolves: Coverity CID 1644077 Signed-off-by: Djordje Todorovic Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-ID: <20260115130110.2825796-3-djordje.todorovic@htecgroup.com> Signed-off-by: Alistair Francis --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index e56470a374..9be79622f4 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -83,6 +83,7 @@ void cpu_set_exception_base(int vp_index, target_ulong ad= dress) qemu_log_mask(LOG_GUEST_ERROR, "cpu_set_exception_base: invalid vp_index: %u", vp_index); + return; } cpu =3D RISCV_CPU(cs); cpu->env.resetvec =3D address; --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962847; cv=none; d=zohomail.com; s=zohoarc; b=EZxO9VM3LRKPmCPeLz/2FCc1CMpZrhERdE7ffnqH1zXhlBoOHml8rAdUkXsrFpYzLmhS3akXb+rFeySUBaEmGrNITO2oJPhdg0iLr1atajwjL64FwyrPs59IQK/VaD2iHG4Dfahk0OrOSLbuf+j6c8DbpVqvEmn9RDXDtd2Z5Ns= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962847; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Bk82OHFtjEe8wWg85HAeHQIn5dp8uY1iPeCPq+1CvlM=; b=DKtvmnkyACupqGCaXaK2UI5qtWwVI3RChPmgs5FrHL0oEcfxG9eaqgn4vY0ZgKkBSJzgW7VrOFLHSh9a/ZsfnaiI1KEIlcjm1cGPZ43UnPoWUVs5fvmHXhjuOO8l0ZjCavXgS5wUqzNz7IzRbo/USP6xmTgt8TOH/zSjdtpt5YU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962847335243.13008779985842; Thu, 19 Mar 2026 16:27:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3MkT-0000et-2A; Thu, 19 Mar 2026 19:25:53 -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 1w3MkP-0000d7-FW for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:49 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3MkN-0007cI-Vn for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:49 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2ad21f437eeso12355995ad.0 for ; Thu, 19 Mar 2026 16:25:47 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.25.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:25:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962746; x=1774567546; 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=Bk82OHFtjEe8wWg85HAeHQIn5dp8uY1iPeCPq+1CvlM=; b=BDnMr2e1FNpt9IFW3E5u7kfl+igE6pies/po7XH1Ttt3qrEP0SHhr611duRA8ezXl0 ZHzQyTgP8dUaf6qi9D//Ju4EY5zY99HqcmORn/yZGN89xWzC5E1NN+FKVnWcivxr//Gr MiRChQs1g2MPMQ4kUXfZ5gBg3i0NCrUc8stgOqE8yDZVUFCDcestucqKMf88ySUh2tND BVTfZpB+z/0nwRsVUx6rH+w2uwbVF8iqokyiQWMDKZzqPY0Wuex6Zrx9V+QHCpgt8Htx JueexNzHh/vVaXm24F9/SN3VwrVgk06aCLNKhpGNwtCeRbUmwahjGu2k91Tm4iBBJLMt VIiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962746; x=1774567546; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Bk82OHFtjEe8wWg85HAeHQIn5dp8uY1iPeCPq+1CvlM=; b=Qo7ekN6flDVFoExxlcA4669CBo8HGfY1FreMM5ifp5h/k7c53Po2p7SOi/j/ChXJwU JAZq6vBid2BtdAtAcJ5SMFKYFPWkilGoQ7iObc+rDbBXFowV9ly4raz7+B285d3a4N1A GWF/zKcPBMu9o5WKJVJ0braX+kd53fZGkDqEx5vzXv6dQFzgrX7L+HH1HxDMkzBw8MrQ g8P9H9mrr/3JhQEqBcU2WvTz+ixZ4t6LwUg48LB2wv/e7mEpsum3GyCVJqRlZsJyb3xT 0KcZ+gvBjcNvZTDuHadCXVQrwAZmbDvcNGvWrBRuQkWYCcV6LuoFVO4zF/S4PlxmcPMM LKXQ== X-Gm-Message-State: AOJu0YwNegrJwWrABlVjf5olrJZRhiS58qtqYlNV7NWjqpy5Nfpfc+L6 cRTXWcyoupyzty0LFfa5Hlg9L5Bp/9j6bsthmCniCPHLwRib0jh21BXEyN01ow== X-Gm-Gg: ATEYQzykJolqg+iDLDo+k1wtEOhNhqQlXViDlxcrXUyXo4EIQT0L0k0rLt4czyxTouY rmg4lj6kNPLulSu0Rjapt7ENh0NyNigHHv8wYaZQdu8ltlD6qRueXmRn69VUE/RKK5vdtAWOXp9 Sh+KYwzVovrlCCsXe1ZLHhhZAoHDLiUUwnqUHwPU3rG/V9e/ik8V35SLgX3LsdUiYxG1W+GblO1 bQ2+rj36hwcSowdWAaQBu8PiLz5iGPSAhxjrCy6KYROr7mTf09ee37ARUodz1DjslNgtyZJ9cQD XBad6sBLJ6jZbxR/Mmz1eq/VfoZx1JhGAkYXGGC6YFf0Rgp3kvzmY4izy8I480XXERrfkYr38mP T/TMCQNpK+SFoYAYmpp7aOiX8rWcBRuV0pOV9HtybUrfkKNVoHtOSeZq2ACqri9al9xn3YHLaL5 iZ3wKmyP/vrQSvw47b6H2j23iD0ne7rAzuRyc7ra1Rdw== X-Received: by 2002:a17:902:e5ce:b0:2b0:6365:217e with SMTP id d9443c01a7336-2b0827bd213mr7014975ad.15.1773962745930; Thu, 19 Mar 2026 16:25:45 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Daniel Henrique Barboza , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alistair Francis Subject: [PULL 03/17] MAINTAINERS: update my email Date: Fri, 20 Mar 2026 09:25:08 +1000 Message-ID: <20260319232522.1867400-4-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=alistair23@gmail.com; helo=mail-pl1-x62d.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962848310158500 From: Daniel Henrique Barboza Also add myself as a "RISC-V TCG target" reviewer. Signed-off-by: Daniel Henrique Barboza Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20251217191726.194767-1-daniel.barboza@oss.qualcomm.com> Signed-off-by: Alistair Francis --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 97f2759138..62fb18d125 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -341,7 +341,7 @@ RISC-V TCG CPUs M: Palmer Dabbelt M: Alistair Francis R: Weiwei Li -R: Daniel Henrique Barboza +R: Daniel Henrique Barboza R: Liu Zhiwei L: qemu-riscv@nongnu.org S: Supported @@ -4134,6 +4134,7 @@ F: tcg/ppc64/ RISC-V TCG target M: Palmer Dabbelt M: Alistair Francis +R: Daniel Henrique Barboza L: qemu-riscv@nongnu.org S: Maintained F: tcg/riscv64/ --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962810; cv=none; d=zohomail.com; s=zohoarc; b=oEv9RpaTiDn2wAASK3Yw5u0w67w/zgR0791fP9L0ZE8mutYszqwy0/wJkSw+42GosDEJB1DkvsZFTNsTi/YXv64vTra9VUho1UOQztC0mGtVC8Qja5kJArROslEDka561HU+HZ93/vfqLBetyMZ5FgdS1gCvmgrXM25dy6+ueYY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962810; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BGSATsLFsfHshxNlmzSKfII+zwdPR9wYNnJJOI144t8=; b=M6W9DHsdp4TwdVfwdZH3WUfwK8Tt3NcyIZQr7zJnauL0J+A5vYkLeJmarCWbenkDXupwNtlOoxz8KJC0sFC+JtxgVDGig9l0EquFvHLmGF9kY8033JpkBBFfq+FXY08qdOgpj7J1LJN+toYg33vgF+eW7c6Ej608coRczs6CnLY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962810368490.76562721733364; Thu, 19 Mar 2026 16:26:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3MkY-0000jm-Eu; Thu, 19 Mar 2026 19:25: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 1w3MkU-0000ht-K9 for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:55 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3MkS-0007cc-UX for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:54 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2b0603ee486so10353775ad.0 for ; Thu, 19 Mar 2026 16:25:51 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.25.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962750; x=1774567550; 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=BGSATsLFsfHshxNlmzSKfII+zwdPR9wYNnJJOI144t8=; b=bP437ccZxkDqErC4AuIel5DVFBXPLs+NxeHpL5UtRc4ntOJY4+qVgrawPT4MOwbB1n rKfI5XHudQwxDS7NvjO8TRVy8yHd8FVRjuv4YGQOllkjAZt3BHsKMxSuDfiosWmSnQlJ w3gcJPUTyeJwGKGoITxHgHKZ4XdrPULvOtqIoauRtkgyyY89p5EdMOIYLQ18DE3SGMi9 Z2GG3ujld48eGtHEnjyniK5WBDNnD3TnIzdPFTN8RX7ySQDNxrJwpEj+U+0IHXu94FNU s/X8LeqdG3gXn+0CKjGBpVgy6mx2YX4TCNTyISK59r62qdwUb92y/qegODEsOZ/yPnOy vstQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962750; x=1774567550; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BGSATsLFsfHshxNlmzSKfII+zwdPR9wYNnJJOI144t8=; b=KBRuPcQ+jAk6WVZcXtgyMCiHE2d57MZ3kWIz5XupSUPmAXq4hJvoyi4U5Ky1WnQGJA jX0QfzIu7Ywj3Yw3JXq5BqCnlzu0qF0V9toZW9BGIczNY8T9mS6EgjOUzXzK9A9GXaMA d9DFA1ZmIcCbcHEt9pEXkAP5OGSPziyxAQkjc/m60ZpisAiFvCu8PNdnmv0z+D6/jwD3 ux2u3QFbwygL/ccH1QgOQxhDuRRFHLzfnR1tdrXy4hAM2c/lN0vfI4MSabY8jsWKyKne EsN2Foa4QPXjxmPWUtRyGi9MMFQ0TkdY53liS6onchfDki5IkOHE9VIQt2MlW4Yv7YZJ IzFQ== X-Gm-Message-State: AOJu0YwVpajSriA0jzijqd0KFf2MtVK2Ee4KJoLDvSaZVgsGirTy5Pw5 Ch/du1EZyEQ50WJsDV0Qgcc2R88eC8LjedSjez9arJvLZoHkDvrsyRF8B0EK/Q== X-Gm-Gg: ATEYQzza+AgZr6aPBlkKcef6cMJ9DP3O0W3w4SPmKz+j97KgxsKX7SiUF4stOfkEoxX rF/BbY6TtnFyv6FolhDrMZjfzrFEzlrj7PjEqSI4LS5KWPsvNzGGa9r7gqLldYRipbUO5cazMnq sI/OWLgGFV+p5ZJ/qlbymbdmEJzGa5GcmR4iNkotyklqWcM/6WqK/oxd+E3BTIgEedCXm/x+xOb blgGu04J1z42CM47uXP0z4UK7CZRPqK3VT6n76/JlT2t5bpgK3tV+zDHVJBcx78nXcmzKU67PxF +Hs6hLDJHUdiuIPU6NC9Kn/Km/7GQ9mVqNNOZZl48d561sMeuNPmo0uAwbN32LoucoEf9vfGjzM t9ROJqrsW8H12GUFpCM0jDlrPchnizUoFHtZxC8LDb5Kk/UhrFuh/NivEww/HyR8lYcWv6b18NZ sucKl45t73ofcZc6NKNJF9Yi87kmpGHvhVkqn57S6BtQ== X-Received: by 2002:a17:903:41c4:b0:2b0:5661:e10f with SMTP id d9443c01a7336-2b0827d7a84mr7128565ad.53.1773962749693; Thu, 19 Mar 2026 16:25:49 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Chao Liu , Bin Meng , Daniel Henrique Barboza , LIU Zhiwei , Alistair Francis Subject: [PULL 04/17] MAINTAINERS: Add myself as a reviewer for RISC-V TCG CPUs Date: Fri, 20 Mar 2026 09:25:09 +1000 Message-ID: <20260319232522.1867400-5-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=alistair23@gmail.com; helo=mail-pl1-x630.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962811785154100 Content-Type: text/plain; charset="utf-8" From: Chao Liu Add myself as a reviewer for RISC-V TCG CPU related code to better participate in patch review. Signed-off-by: Chao Liu Reviewed-by: Bin Meng Reviewed-by: Daniel Henrique Barboza Reviewed-by: LIU Zhiwei Message-ID: <20260226102008.146928-1-chao.liu.zevorn@gmail.com> Signed-off-by: Alistair Francis --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 62fb18d125..25fb621c30 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -343,6 +343,7 @@ M: Alistair Francis R: Weiwei Li R: Daniel Henrique Barboza R: Liu Zhiwei +R: Chao Liu L: qemu-riscv@nongnu.org S: Supported F: configs/targets/riscv* --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962869; cv=none; d=zohomail.com; s=zohoarc; b=U/4ily7k1VKaU+GY6y1C8xv7EdU3JCGzt+DY6V30HoJsLez+Zi0YF9AteztoJnzX5WpseBOXJjlHvIS+9fqbxIzaNZcLjH8ZnX2qxtq+tbFl+trkzzJJN3ve3KYeIe4df4bfOjpe6rzQsoIzNFwRZlsFSvC8jrFPfHeslSwB9m8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962869; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dnpq0ftMx8G84qoaXkcolzp3tfJeZoMWYUC6e4g/8hM=; b=fQtd249HEsc3cyaXTOlmStSBZxqtgcEZ/YrHdCe99ykc59ceN4VBfdIOjSjTaRBXRwym1WTdP0+owU1ggzGYMC5OO8IpHU6bFJiEbvhsvOExQukC6Kiz3P+gWKCOQPDxAVmKsYPQsbT39rAtbciPwx1NVgntBGx4SPpk/Gfw3Ns= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962869985432.20498856769825; Thu, 19 Mar 2026 16:27:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Mka-0000ki-7I; Thu, 19 Mar 2026 19:26:00 -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 1w3MkX-0000jr-Bo for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:58 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3MkU-0007ct-Uj for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:56 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2ab39b111b9so328055ad.1 for ; Thu, 19 Mar 2026 16:25:54 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962753; x=1774567553; 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=dnpq0ftMx8G84qoaXkcolzp3tfJeZoMWYUC6e4g/8hM=; b=eNZa8EFwRdPW/ZuSsvyxqEuvgfNKYQVnRoe03Zfw1T4lHOPSAbsioKvcNkJ61dRg2B 5kTiGZXv1UzF5sPEhjyCH+LPNXyz6ZltlFyurfxLNQqC4og/Hz/1WkVV5xsqij151M77 RYfhYqi3YG0s3+Ih+OQ5909dEeGzziZETp36wEhaG98cBd3nRxp/sUUUubJXK2e1dPB0 3yJg6vXcx9p0BpT8dy7xUdYxjBWWSnZKaPs8WLe01EE5pppEEjq8GyTx2f4MiNaskCH3 Y6iP9F88mnOeKlhVVBHTrI8dtm+IBXIje1A2d3g2rzOV3sxD83mKsbLCB0gxtBy5iHTu U8kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962753; x=1774567553; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dnpq0ftMx8G84qoaXkcolzp3tfJeZoMWYUC6e4g/8hM=; b=Lu/UVpvYA/trmRmEC1Ee8ml1tlAHUh8OLrPOGahcTfQHhskswxIVquR/HXEbEdkN61 F1L2pIxrDcbT+o7+KOTV1GE4Xl7Eei84fqj9F/jGmeR7D+WpjO1pR/Y4GHgBWq2qxkFu i2li87x4+hQrT2GYXZd8tLD9e+HRebi8TGhVq+LvS5tkiFfjMSmB2lIppy6EK0QTlSdM asjCQg/W4kFn65dHlwQgeq4rQk3DljRPmUANNe6nm5mX7LUJlF3W/hTdRibr6snMk+gw MxB8533Yxa941t+KO+qUfJobdMWRP+qO6q3Y7AsnoIsXvSDeerMPSnTztv7kIsi5ZOh+ TlyQ== X-Gm-Message-State: AOJu0Yz2vLcj7Os6qS4EYwSBndz32qN+6m3uTYY5UyFrSsLWuelIJ9Gd CiYPHXror6SzOKrVUiuJtkVJrZrFCjgqJZd0+bp4NSukhxJzDP0rezSCSoS2/Q== X-Gm-Gg: ATEYQzw+TDOHU1gUhchrN3QN8nrHyHXHa8pySIxBCIh+nsoMpXPI/Qq+W+sGawkw6U+ BHFsmVm52xSf02DG0WotSsynwd6gxAtS/oL+srXeJqwESDs3n245/2xPX3Mzm1V8lfFfdrw0pXh bEKoUD08thhM3pyQud3Uf8qic0SX2g7G4cbNHA5tuB89A8ItX7xSUHpE0UItbw9f36yM33a2iJy Uq7e8Mkzk47q/YE28XqzSh0RUIIYtzn/lDsRjE3LTNnTcAbPnxOe0NF/leYXY3O8JD9EExDlvEH m1q1DcW+VY3WnIqqRRMG2VO13g6xRXqgkP20SQalDsRUb7cP0n1vWd+ieX2Ieq2HUe7qsq88dIk 6sWo5FnmDRd96DMY3a2IxGPPyRbuexHGa/vtbaBFxDp574a1R0TSosvtjbuz9WpbW/YgYmNy/eC db+qfHW/GSZEURSMyLaH9I4gRW+DH1cq9b2S3pF84DdQ== X-Received: by 2002:a17:902:f790:b0:2ae:6259:5aff with SMTP id d9443c01a7336-2b0826ffc3bmr8420105ad.6.1773962753006; Thu, 19 Mar 2026 16:25:53 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Jay Chang , Frank Chang , Alistair Francis Subject: [PULL 05/17] hw/dma: sifive_pdma: Set done bit upon completion Date: Fri, 20 Mar 2026 09:25:10 +1000 Message-ID: <20260319232522.1867400-6-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=alistair23@gmail.com; helo=mail-pl1-x635.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962870350158500 Content-Type: text/plain; charset="utf-8" From: Jay Chang Ensure that the 'done' bit is set upon transfer completion, even if an error occurs, since all transfers are considered completed regardless of success or failure. Signed-off-by: Jay Chang Reviewed-by: Frank Chang Reviewed-by: Alistair Francis Message-ID: <20260304030816.33209-1-jay.chang@sifive.com> Signed-off-by: Alistair Francis --- hw/dma/sifive_pdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/dma/sifive_pdma.c b/hw/dma/sifive_pdma.c index 6d06ec0375..7b22e51492 100644 --- a/hw/dma/sifive_pdma.c +++ b/hw/dma/sifive_pdma.c @@ -153,6 +153,7 @@ done: error: s->chan[ch].state =3D DMA_CHAN_STATE_ERROR; s->chan[ch].control |=3D CONTROL_ERR; + s->chan[ch].control |=3D CONTROL_DONE; } =20 static inline void sifive_pdma_update_irq(SiFivePDMAState *s, int ch) --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962782; cv=none; d=zohomail.com; s=zohoarc; b=oKYfm1fVlkqrOFriylT7Z63B1WKOXs5r5E9p9NSqSb2cmxOGs7sfO3wxkUU4a3SD6v6xojZQSRZBexKFQXsqonmKWRErMAmrZEFShm8S9yF3nhT8IYc6Csz5TW5I6UU5u+8Vj0Ze+cqg7enjac75Ar2XVSDX44vCdm2acJ+bz9k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962782; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Xwoi+O+VyBLBHt3oqgyEn9Gx8FelMnzje7H/aNHtlwE=; b=mQe/2cqJU+dLe0v2XBLyFPN/q+iwPhx/857ZeHVDY3ZdFV2EM9rxu8vEwdssrI8XRMmQ7wxfZtbIHSQ2pSRMv6366o5GBYFoNvtyrlW/ziGTy8DI2a70YkG44gcDO3yVizJrOY3qb2B0P8PeaOp1oGZ508Qy2Tgc0+gfZHs8VYc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962782647504.12917554069463; Thu, 19 Mar 2026 16:26:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Mkd-0000lD-Bw; Thu, 19 Mar 2026 19:26:03 -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 1w3Mka-0000km-7u for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:00 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3MkY-0007dI-KO for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:25:59 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2ad9a9be502so431865ad.0 for ; Thu, 19 Mar 2026 16:25:58 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962757; x=1774567557; 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=Xwoi+O+VyBLBHt3oqgyEn9Gx8FelMnzje7H/aNHtlwE=; b=DmHf5WSbYzwt2lWIO8mu+HWnFyg4Zy+ryXWYW8pSp3p2eL59QogPjaDExdvLr19aG3 4fgqx5a+VexuEvLKhHgCXMcg5QYdPaHXsno0XqeMbr/oC5ZkNWohh2BFuqaO7SkZcuIx zq6Get5QiZeGzYbM4ZdL63z4wc1RyDevkigswykZgDsa25EFQfoVW7ZqMKeh+7O2liYK X9QQd4ClwaGXtIvyXSh8Y6K1sLtdXpUuGUL0G4HdGn4Zmc2ZILdfkDB56eb6i/XgyYeD BzMTGtDLOfdhEG9oPT/EVEQCp1ivoabX9H4ejA/TsHDlRx2ANbIeA3NQQw6bO7asSFzN Pfzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962757; x=1774567557; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Xwoi+O+VyBLBHt3oqgyEn9Gx8FelMnzje7H/aNHtlwE=; b=muLZiUWdOjBs+lTPW6aFL51HS2++5GgpHqqtLgEb1jxbDUOLW+Vdh+kIjxCWV6WJMR kyUFhgpHA+8gi2iNfr9JgAeko7SLli7dM2U0JrAYvGiDLtT4EwrmEF4+zmyep0omxXgN 1rULkUIw8GXImD3R0Ub4qyC/3+fd1K6Lc3fisfNbmQ+b1Hi7CgUMrpqDsaBNo67sGqza ICqhH3cSQnDkroOdY7IvGVc1+ANQLnEPEMgJU6jDTRzqS+X73D8X/9++Nr5MIoC7xZLZ eSiK3LTYQuahpPvFsr9c6P+T0Wk7CAkb5RFgTrz4AL3ie+hO5zd1CsZ9iw6D/KTIuRwZ 2vmw== X-Gm-Message-State: AOJu0YxcJOc7m9Ts6MNbl8MCofSFI1CTiBhxs1L6ldMAGyr4SPBIkLRg QsSbfR7K/Am+nGaDZyG9os/KfrNW3oZB2QSiYhFLwgAJRy/7A7ywz9mySuC62w== X-Gm-Gg: ATEYQzxuiJ76Sr/8tppDwaX2/MIveBzX2vpXPmMW/hByURlQ0EzasdO3xQz0+VkgXFH 8a0MUG4YHYvGX/T+tOZHE5HMLq+PJ7CkHVqv3eTTyrlTZYp2RKs9KalMUJAuLuNVZeUmfOyMImZ U9zQDaiU0KR4NiqAnIw05QxhWKtwRdg2BX1eEhELUcR0kpU7Cc1avU6SRZis9qC71ctVdbzY5OG UCZKVaq0it8G1OSo0k2zrparlZL1NTrWtQ8GUk19Wdk5m5GB8pZp6PK4TG32C/TzzpI6X37OKkV qTaXzdekZrpdhoPB6fnTFNpSiaOEtQxFGqCAoTt1hePmeRGJVV0pX4dAVTmcZbZooiuEQRJZKEB f1/tENe/okaByubDODla5o+YBQbBZIFKTEwQyfh9P3Tdkg5owRtxx6H/DW8FL/20VsMmlgZi/kX tLsyGGrR1y17yaSmq2XjCeestGhoBhw2tyDB7CkBGS5w== X-Received: by 2002:a17:903:1a0c:b0:2b0:7255:8df2 with SMTP id d9443c01a7336-2b0827b8562mr8635255ad.38.1773962756772; Thu, 19 Mar 2026 16:25:56 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alistair Francis , Chao Liu , Daniel Henrique Barboza Subject: [PULL 06/17] hw/riscv: Remove deprecated 'riscv, delegate' device-tree property Date: Fri, 20 Mar 2026 09:25:11 +1000 Message-ID: <20260319232522.1867400-7-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=alistair23@gmail.com; helo=mail-pl1-x62d.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962783989158500 From: Philippe Mathieu-Daud=C3=A9 The "riscv,delegate" DT property was added in QEMU 7.0 as part of the AIA APLIC support. The property changed name during the review process in Linux and the correct name ended up being "riscv,delegation". The incorrect name was added as alias, and deprecated in v9.1 (commit 38facfa8432), so can be removed for v11.0. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Chao Liu Reviewed-by: Daniel Henrique Barboza Message-ID: <20260227232838.23392-1-philmd@linaro.org> Signed-off-by: Alistair Francis --- docs/about/deprecated.rst | 11 ----------- docs/about/removed-features.rst | 11 +++++++++++ hw/riscv/virt.c | 9 --------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index c37643548d..a6d6a71326 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -481,17 +481,6 @@ versions, aliases will point to newer CPU model versio= ns depending on the machine type, so management software must resolve CPU model aliases before starting a virtual machine. =20 -RISC-V "virt" board "riscv,delegate" DT property (since 9.1) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -The "riscv,delegate" DT property was added in QEMU 7.0 as part of -the AIA APLIC support. The property changed name during the review -process in Linux and the correct name ended up being -"riscv,delegation". Changing the DT property name will break all -available firmwares that are using the current (wrong) name. The -property is kept as is in 9.1, together with "riscv,delegation", to -give more time for firmware developers to change their code. - x86 "isapc" board use of modern x86 CPUs (since 10.2) ''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.= rst index 6f4447993c..557a24679a 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -1239,6 +1239,17 @@ converting to using TCG plugins they should contact = the qemu-devel mailing list. =20 =20 +Firmware, ACPI, Device Tree +--------------------------- + +RISC-V "virt" board "riscv,delegate" DT property (removed in 11.0) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +The "riscv,delegate" DT property was added in QEMU 7.0 as part of +the AIA APLIC support. The property changed name during the review +process in Linux and the correct name ended up being "riscv,delegation". + + System emulator devices ----------------------- =20 diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index bbce2fb667..a1c323e66d 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -666,15 +666,6 @@ static void create_fdt_one_aplic(RISCVVirtState *s, in= t socket, qemu_fdt_setprop_cells(ms->fdt, aplic_name, "riscv,delegation", aplic_child_phandle, 0x1, VIRT_IRQCHIP_NUM_SOURCES); - /* - * DEPRECATED_9.1: Compat property kept temporarily - * to allow old firmwares to work with AIA. Do *not* - * use 'riscv,delegate' in new code: use - * 'riscv,delegation' instead. - */ - qemu_fdt_setprop_cells(ms->fdt, aplic_name, "riscv,delegate", - aplic_child_phandle, 0x1, - VIRT_IRQCHIP_NUM_SOURCES); } =20 riscv_socket_fdt_write_id(ms, aplic_name, socket); --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962799; cv=none; d=zohomail.com; s=zohoarc; b=hqFuRDtiHwW/OfN9H//XCmaW595kx0GNm529u7OAXgEsgt11HJZota0yYfsl1NnDtZF7Z+ukM8ddksJIaR2tCcxQkVGmPPk9+Op9mMIRgqBlDHbBDOlTxz1x7h4TW5/mTgOCdHp7wmM0voDSjwc3UHdreI/4m9q8mCv+ZqpTjs8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962799; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aiG6bmN4hvSd4Ok8JNbYY1S2q/CsTpB05WZb49qcpBU=; b=hvdxWRopsta+kqJzo4hEc+h6ASAYfacTEWNP3xkYPVYe8zA6JawkN6EpXOcLo4nXqIeVgRGcywLR0ns9Ioaxxt4KzweIJoOJ5MpiwwxXfemu2uQqD80iWA7NzVgyZ2fHab3C1Ojz3BZViT5N0ai4/fh6Usq0/6wFn8BYZML900g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962799443154.3403511822844; Thu, 19 Mar 2026 16:26:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Mkf-0000lz-WE; Thu, 19 Mar 2026 19:26:06 -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 1w3Mke-0000la-HN for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:04 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3Mkc-0007db-TG for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:04 -0400 Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-35a288a2c00so720038a91.2 for ; Thu, 19 Mar 2026 16:26:01 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.25.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962760; x=1774567560; 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=aiG6bmN4hvSd4Ok8JNbYY1S2q/CsTpB05WZb49qcpBU=; b=Q0eFifhsq1uHp/3SBGDZh6CW+CCF65seXzTisfJyeyR+vu9OFzpCaCPY1/eY9NEk9u Fn8kU20Vtix4n4gq6a60NqMrni5FR5QLz90XpcMVJxwdzCiJfttM6E2YSBJ4ds9xLh0z 8xsa3wVx2YxQxy0A0/V90QtE6Cq4TUSWkz+ACxWIeDc5JQeqBJwJjLfIfK56gkjP4rMf dzyXn41Olrw8CfHStL0xVMhIA+4S4IhDns/5GZx9hnsuMNKDg2hSvnG9Y/u3+MX934Jr SQHnChA3TMXYJ7ATwFLDQfEPrlouF6h7ywW3Ld0tvMaggBZxjdPcW8EsERcLaWX282kR 9Elw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962760; x=1774567560; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=aiG6bmN4hvSd4Ok8JNbYY1S2q/CsTpB05WZb49qcpBU=; b=JPKi6q6kV2QRbXcaYISTNj+ufeF0d2aBFxkd/sR5mtM0hDzFl24LOL0JThWFSIdgME ESvSQ4QyZ1Vi7+qf5navH51nMngP74Nf7dM2NbcNAw3PeW/X11KAG0REPLrX5vjtoNGy jAk2l8Hhx/jaLI78zXV8BUYD1fVBlj5JMwLohkz849PJmY6RHCDpTmXeocx0vs1k1z8v Oa+laG+SSJbfo1ITgYSc02o5rYftYEqzKSTjvVAkYUhBbEl47Mi8c8orGGsgvmIdshXm HUN8h8MzOmQBWMvhf2BW5nY1JuzPdX0IY+z+uyCd73H3+p0gIhW5NP0/LxffcWjMP7DA aAiQ== X-Gm-Message-State: AOJu0Yz7fcQIX0SuN+fLnYPdN+wki+ZixmJ0/RQQaudCBHhzK2HnGLnd vIXOxwXqbwarNYF2mtKOFA34KFFUnVlVgBMqZEok5lypc/ycYKuNboH5CoWHTg== X-Gm-Gg: ATEYQzztW2QNN9KEX/OIMl6/k5q1kLJpd58V4o7wLunVuO0l2qAMNpijOKG6cDaiAEr JnGyGh4YYst6x0+RBrrPGmvmSHDsSirvHXdSs5js2or9yfV5Memrg68cxKkULSZzg8q1N3mFtex CrIAScXMBK7hmy0+ezHCbL0L911fttttIqOHs+AQjsPSKWCHZaDYhcpdMlBOIhJJ1eXvJNrpCt2 EEBpuCRvQ8L6sM3evl4Q3vN8sZAqKWHe7ah0/eyDx75laIjbuxn5xUg+4oHXFm8/A+IQsOC8W5a yu1kyvZuPSOifkFqLf/GbyOQdOAChYaWGhraD5ASpd/BPFktoIA+fHxryKLuj0N6EMN7ATNQnVf lsGik5ltTUmde1sESPMrmJiFQHkZj6rCsiKNv4tO+uJQEOb0xwo23tJmLGIDa9x30K0SH6V37nE 198Ojh8its8AL6AUC/Z3d7CsBo46IekQdzdwjNpWHp3w== X-Received: by 2002:a17:903:4b47:b0:2b0:6e60:958e with SMTP id d9443c01a7336-2b0826c3fefmr7790975ad.7.1773962760363; Thu, 19 Mar 2026 16:26:00 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Max Chou , Richard Henderson , Chao Liu , Alistair Francis Subject: [PULL 07/17] fpu: Fix repacking issues in the uncanonical step for E4M3 overflow Date: Fri, 20 Mar 2026 09:25:12 +1000 Message-ID: <20260319232522.1867400-8-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=alistair23@gmail.com; helo=mail-pj1-x1032.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962800095158500 Content-Type: text/plain; charset="utf-8" From: Max Chou In the uncanonical step, the input FloatParts will be repacked to the target FloatFmt. This commit fixes following issues after calling uncanon_e4m3_overflow in the uncanon/uncanon_normal functions. - Add the local exp update after calling uncanon_e4m3_overflow in the parts_uncanon_normal function. - Add the fraction shift after calling uncanon_e4m3_overflow in the parts_uncanon function. Fixes: 27e989f99c ("fpu: Add conversion routines for OCP FP8 E4M3") Reviewed-by: Richard Henderson Reviewed-by: Chao Liu Signed-off-by: Max Chou Message-ID: <20260226071817.1417875-2-max.chou@sifive.com> Signed-off-by: Alistair Francis --- fpu/softfloat-parts.c.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc index 61b07307bf..a738758aee 100644 --- a/fpu/softfloat-parts.c.inc +++ b/fpu/softfloat-parts.c.inc @@ -387,6 +387,7 @@ static void partsN(uncanon_normal)(FloatPartsN *p, floa= t_status *s, case float_expmax_e4m3: if (exp > exp_max || p->frac_hi > E4M3_NORMAL_FRAC_MAX) { partsN(uncanon_e4m3_overflow)(p, s, fmt, overflow_norm= ); + exp =3D p->exp; } break; =20 @@ -496,6 +497,7 @@ static void partsN(uncanon)(FloatPartsN *p, float_statu= s *s, break; case float_expmax_e4m3: partsN(uncanon_e4m3_overflow)(p, s, fmt, saturate); + frac_shr(p, fmt->frac_shift); break; case float_expmax_normal: default: --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962797; cv=none; d=zohomail.com; s=zohoarc; b=Ixyo/3UiwaURJCo/2Jx623lhMIN2FvRmWveN1AmBkLTdt25LeEntvcFalinN7EICCTGkObUuziXpCMrWAkWOreg24VRVEcZbox9L5/vifioPFH86jUa6ft3hvukMWr3zwSU6Yub7jN5yeKfkKQwni3wzQAraq0ixpcT5typNcjA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962797; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZHI7TpU+QC4WTx8gqgxxH5tKvjATJUhEPGXQ538mrRM=; b=LoZY4JEqAjkCJX4xXggKLkLquMZeQ6VbXsX17hvI4lCk/TkFbqKdBIiXukFcjSWlkr/5ymWhdLNxGdECZtCrcA5cCUbVUUiS/CAJ5VhQtPIVxIuia/i2/VX5yZljneaQrqedSWdb7T2Ya3lyeHZznZ/96xeWX4mfVim3Tg6AtuQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962797091466.86154606549303; Thu, 19 Mar 2026 16:26:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Mki-0000mO-G1; Thu, 19 Mar 2026 19:26:08 -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 1w3Mkh-0000mE-Gz for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:07 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3Mkg-0007eB-2F for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:07 -0400 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-35a09e0dd63so99795a91.3 for ; Thu, 19 Mar 2026 16:26:05 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.26.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:26:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962764; x=1774567564; 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=ZHI7TpU+QC4WTx8gqgxxH5tKvjATJUhEPGXQ538mrRM=; b=Kdf255Mw0zqF8XltjUz0NSEfbmT7x3zLKVVMcclqTEWm3/TKywCuZgXYMFonmy7b3E YWXNYgQvV6mtec1pgbPHcwnyDkcrpX3nyO0vfZGnFFUPopr9/IkREvgU4g4VtLMIEC4y 52OvLiuB30zFpPvJeAacmRNlQidkDMWgr2WQiLQM77FerRKRnNpk6Qh9yBO4FGIcxkuH aDRssIzNJ4gvIR4JW1jWolhVZnJMmAM6FtkwoHfgfl5K7g9vpReDPKCRwiQeNC8KEyTz sfDJBbYGPKQiBlAaAtOtcvGi6lu87H1BN7Cr6cYMIfP75VAFOaTLlXBzJmblXUhSx2Jg jdaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962764; x=1774567564; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZHI7TpU+QC4WTx8gqgxxH5tKvjATJUhEPGXQ538mrRM=; b=XqczN3ieQENXzkscmsxMbdpfes7Q+DZfF5FCgJaw+hxGXH5lKCnAFGz7/U3/Z1vL70 oIgNyWgA96K5qx9au46soOKt72GiuTxC22hT+3akA9rEB2u2MG5xy8cgRSjBbluM0w0N f91jLjIuJcNb26tZUS+Rt6ZJ/geiPi4Sp8Qei5l3hlGH4bCsINafy0DTgx5mlwMoKXJB C+7QCZBPuC8Tv17PjJ7COkYEGMTHryDfcO8LLBeMlz+lgtc0Fj5R4OgUCXWUPL8/vyBw Of8YuqueEsdQCVqrk13GTeEUtv7VX50n9P4qkRjAktgjGq86YmJst3jpYAUJ8d1+Bv6p EikQ== X-Gm-Message-State: AOJu0Yxqmoz3mz327HJXUmoDgmXlhQudEmqxMZ6TdKCVRs0m4DbYXPnD kxR8qP41TAV3ZLLVOk/GSuA+2l77VbSdKWF5JX3bRkl/mI43aalVqOmes5WFug== X-Gm-Gg: ATEYQzz8JCNCpo2BKTopRcpplA+U71j6ro9eEUeFDY2tjXn+FA8UR3jrjYlaknJrqzv gjHKSsksFvpzEKWFO4IYKlCBPzfOClhI6NOOHhmz5mdHm+eLXu+rpiaRDVDKS9fbvInSkAwdnLF B8Q3ikPdshZ4sMMVxJWAnOUHQ88mC7ZXC5KTITE4HoYeCWn7gBHPylC5FsWh6pA4lqCUR2cmpC6 jlWJxkYrwfQe7rvY/dN9dQtg1oDogFSMVXSUEuWizg9CkNPiF415INcaEuHewuVpZAEz7z0wtP6 iyDxEAGfvwlw8xEhIDeawi5bbg0GKQ2dD1yEryZxZ8ga2hHqNSrTsVqASj3Qodu1Z+vuxOrJoWv gvA3E/DNLr1oQegbEtYpYrypka3tsZyemBLMlSADikP8BbqH8ic0PCi8eCmp4p9j2uMPGm5O8sV oNHSM3C9MJAaxbuCqle0zIyNprPJhgAw2yfxiDm3uvrw== X-Received: by 2002:a17:903:1a4c:b0:2b0:68d1:2557 with SMTP id d9443c01a7336-2b0827c9591mr6709445ad.45.1773962764130; Thu, 19 Mar 2026 16:26:04 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Max Chou , Chao Liu , Richard Henderson , Alistair Francis Subject: [PULL 08/17] fpu: Fix unexpected exception flags when converting infinity to OCP E4M3 Date: Fri, 20 Mar 2026 09:25:13 +1000 Message-ID: <20260319232522.1867400-9-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=alistair23@gmail.com; helo=mail-pj1-x102e.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962799582154100 Content-Type: text/plain; charset="utf-8" From: Max Chou Infinity is a special case distinct from numeric overflow: - Numeric overflow: finite value exceeds format's max normal -> overflow|inexact - Infinity conversion: input is already infinite -> no flags This commit fixes the unexpect exception flags by relocating the float exception flag update flow to be outside the uncanon_e4m3_overflow. And raising the overflow|inexact for numeric overflow in uncanon_normal. Fixes: 27e989f99c ("fpu: Add conversion routines for OCP FP8 E4M3") Reviewed-by: Chao Liu Reviewed-by: Richard Henderson Signed-off-by: Max Chou Message-ID: <20260226071817.1417875-3-max.chou@sifive.com> Signed-off-by: Alistair Francis --- fpu/softfloat-parts.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc index a738758aee..3c323c0cec 100644 --- a/fpu/softfloat-parts.c.inc +++ b/fpu/softfloat-parts.c.inc @@ -277,7 +277,6 @@ static void partsN(uncanon_e4m3_overflow)(FloatPartsN *= p, float_status *s, const FloatFmt *fmt, bool satura= te) { assert(N =3D=3D 64); - float_raise(float_flag_overflow | float_flag_inexact, s); if (saturate) { p->exp =3D fmt->exp_max; p->frac_hi =3D E4M3_NORMAL_FRAC_MAX; @@ -388,6 +387,7 @@ static void partsN(uncanon_normal)(FloatPartsN *p, floa= t_status *s, if (exp > exp_max || p->frac_hi > E4M3_NORMAL_FRAC_MAX) { partsN(uncanon_e4m3_overflow)(p, s, fmt, overflow_norm= ); exp =3D p->exp; + flags |=3D (float_flag_overflow | float_flag_inexact); } break; =20 --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962845; cv=none; d=zohomail.com; s=zohoarc; b=aE78DU039BFQqhGjiQhej2yaxyiM6dAMkO0G6DpVu1H4f4PHaGKz+kndw7Nt2QGeSJVjs4dEyI4eWRdcvVIVLlxNeCjzBM4Dy4wS/C408qRY4f8iFOnFANx4Gv5fGmhnRgjmEjZI7gVrt1FKuiW1n68pbM2yorxn197OZsq0UyM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962845; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=70Wuh9XuVwVOLKM0dnCbYpUQR78lBLRnJv9Jda1E+Q0=; b=NFLlg8wpeAVm0uQ0WmT3zlQ3/0fRakYxqcqDxIE8NFR+dgVc+lf4oVCTpPbbjVeaEEglN+RkK6wayvZQ6NvTZcfNFB/xXrRJd7ANYjQzGY5eARk7MnU/XivELiaRDW9R/S2/wFrgGIvVKw8LZTMN6eYslYE9q3k+Cb/KD2Sy8+o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962845422717.719686773732; Thu, 19 Mar 2026 16:27:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Mkm-0000qD-BW; Thu, 19 Mar 2026 19:26:12 -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 1w3Mkl-0000p8-Hg for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:11 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3Mkj-0007eU-Td for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:11 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-2b04e6a989eso9795905ad.3 for ; Thu, 19 Mar 2026 16:26:09 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.26.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962768; x=1774567568; 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=70Wuh9XuVwVOLKM0dnCbYpUQR78lBLRnJv9Jda1E+Q0=; b=WCdGpf25hQYbH3qMgWE/tXGMaNsWz/AKm4FM1DGYlj3sZHJiPSLYfHR8jIPpYkoi+X hKdxFVzwrb6zlnTG+9Fef/zPudJi8WBilp16Lfe/6p8suBfM4qa9l4yMr2UhOwcZECV4 HxaLdfXzQ55UkYw4t975bzGqvRkVimPbeldC9zAzp+JyHxGuD+gzj/+7vEwyPz8S+J9q QK+OQrMqo4ROMutACtD2sRjeKoLPVVPNYoOhbplbyU803bNdElwVotRPR95JtFkiSbWx 2fhf7yYIgbPEptdNJECSeVTC+Jm/bP/HL9r7a08/hg407AVFBuAv7Xds6KzCzlF0+FOK bPdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962768; x=1774567568; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=70Wuh9XuVwVOLKM0dnCbYpUQR78lBLRnJv9Jda1E+Q0=; b=hjgy1cXMXPzeyD1PjAdivi/oyTmjuZrm7z8MV50EgS/M0EU9Fw2d9HeHYTHNaKC/nf 9YLuW902RmgxYEHpxw46FPzLrFSV27KpkLHFlIUjQ9zazou+HUcNqWkz1VYx9TjjoPCd 5zBljyrImje+ZpnVLdwLF5g3izN8EkoKbAjz2uqh4WFeZcpH+gP+2SfXXZKHquT5fKfQ uzxMt4CpZrhu1AibwgPBva6S6vJiJuK75OJP1NqueMXUJCya3WnL7DhrXnnjtkDxMRIR kRl/eW+z+F/Jz0pYop69R6F0SDBIGRslIJ7cT8HTTu4jHmeOf5sUkCIzy62jArVf34yA 1T5g== X-Gm-Message-State: AOJu0YwYMTwbZGLr2dRzUha5QLbca6RIua1ttIyWOCfcVj1WCOCx+5Z5 x9AUFwXGpenXqZjXBIsptu3TkufZDJNoCxgIuCmbU1G4zJ5kmyXu75BtTzT7gw== X-Gm-Gg: ATEYQzyaeelkSNqQxmY3Tb89sgnC1YR8/Ic4lsL9tMfZP11qxN21KDwLejIM9sfAEa6 8QXvMnSkdfIAR0IupkFRgI70Nuv5M8qCoND3DJ/OyHJFyrnw64Nvn7Cp9rx5MGSOChRnvV2Du1i BQVduxSxwHQkELa8gbOqO6AOmJQRZziB0JIV5lOTrNx4UFk/qaQx+egSrH9KiJe/VXvANfH/TGf K+9wZ6hLUScwJlus+SGdCtNmYeGJBM1M3b8YvcDMOPK0Okeyl8MTFnHeMTiz7fNf1Ri3ZWUMqx6 6ikTFhQC+9hBCEC2eDaUODnEWL2g9PvNr55uGVx9XWL+1Z78ChPZVFRKulWxMDiukfrmVi2JzI+ gvZv4QZCr+IFb7RSujU2r5ttTiCyWqxeLyjeZHS5XW8RGkBTkOEDef3vogz13z6yQZVaJDYmHlO RrHs0eHMJD5edINy2kf2fp6AiYVr1AjyZdUxi5m3cejliok/TxlIYC X-Received: by 2002:a17:903:1c2:b0:2b0:60db:7927 with SMTP id d9443c01a7336-2b08278ba9dmr8696405ad.28.1773962767885; Thu, 19 Mar 2026 16:26:07 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Peter Maydell , Alistair Francis , Chao Liu , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 09/17] hw/riscv/riscv-iommu: Free instance_init allocations in instance_finalize Date: Fri, 20 Mar 2026 09:25:14 +1000 Message-ID: <20260319232522.1867400-10-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=alistair23@gmail.com; helo=mail-pl1-x632.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962848316154100 From: Peter Maydell The riscv-iommu device makes various allocations in its instance_init method. These will leak when QMP inits an object of this type to introspect it, as can be seen if you run 'make check' with the address sanitizer enabled: Direct leak of 4096 byte(s) in 1 object(s) allocated from: #0 0x5d8415b6ed9d in calloc (/home/pm215/qemu/build/san/qemu-system-ris= cv32+0x1832d9d) (BuildId: fedcc313e48ba803d63837329c37fd609dd50849) #1 0x75c0502f1771 in g_malloc0 (/lib/x86_64-linux-gnu/libglib-2.0.so.0+= 0x63771) (BuildId: 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3) #2 0x5d8416d09391 in riscv_iommu_instance_init /home/pm215/qemu/build/s= an/../../hw/riscv/riscv-iommu.c:2463:18 #3 0x5d841710483f in object_initialize_with_type /home/pm215/qemu/build= /san/../../qom/object.c:570:5 #4 0x5d8417104ee9 in object_initialize /home/pm215/qemu/build/san/../..= /qom/object.c:578:5 #5 0x5d8417104ee9 in object_initialize_child_with_propsv /home/pm215/qe= mu/build/san/../../qom/object.c:608:5 #6 0x5d8417104db1 in object_initialize_child_with_props /home/pm215/qem= u/build/san/../../qom/object.c:591:10 #7 0x5d8417106506 in object_initialize_child_internal /home/pm215/qemu/= build/san/../../qom/object.c:645:5 #8 0x5d8416d16a12 in riscv_iommu_sys_init /home/pm215/qemu/build/san/..= /../hw/riscv/riscv-iommu-sys.c:199:5 #9 0x5d841710483f in object_initialize_with_type /home/pm215/qemu/build= /san/../../qom/object.c:570:5 #10 0x5d841710661f in object_new_with_type /home/pm215/qemu/build/san/.= ./../qom/object.c:774:5 #11 0x5d841755d956 in qmp_device_list_properties /home/pm215/qemu/build= /san/../../qom/qom-qmp-cmds.c:206:11 (and other similar backtraces). Fix these by freeing the resources we allocate in instance_init in instance_finalize. In some cases we were freeing these in unrealize, and in some cases not at all. Signed-off-by: Peter Maydell Reviewed-by: Alistair Francis Reviewed-by: Chao Liu Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260307125222.3656140-1-peter.maydell@linaro.org> Signed-off-by: Alistair Francis --- hw/riscv/riscv-iommu.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c index 98345b1280..225394ea83 100644 --- a/hw/riscv/riscv-iommu.c +++ b/hw/riscv/riscv-iommu.c @@ -2479,6 +2479,18 @@ static void riscv_iommu_instance_init(Object *obj) QLIST_INIT(&s->spaces); } =20 +static void riscv_iommu_instance_finalize(Object *obj) +{ + RISCVIOMMUState *s =3D RISCV_IOMMU(obj); + + g_free(s->regs_rw); + g_free(s->regs_ro); + g_free(s->regs_wc); + + g_hash_table_unref(s->ctx_cache); + g_hash_table_unref(s->iot_cache); +} + static void riscv_iommu_realize(DeviceState *dev, Error **errp) { RISCVIOMMUState *s =3D RISCV_IOMMU(dev); @@ -2597,9 +2609,6 @@ static void riscv_iommu_unrealize(DeviceState *dev) { RISCVIOMMUState *s =3D RISCV_IOMMU(dev); =20 - g_hash_table_unref(s->iot_cache); - g_hash_table_unref(s->ctx_cache); - if (s->cap & RISCV_IOMMU_CAP_HPM) { g_hash_table_unref(s->hpm_event_ctr_map); timer_free(s->hpm_timer); @@ -2675,6 +2684,7 @@ static const TypeInfo riscv_iommu_info =3D { .parent =3D TYPE_DEVICE, .instance_size =3D sizeof(RISCVIOMMUState), .instance_init =3D riscv_iommu_instance_init, + .instance_finalize =3D riscv_iommu_instance_finalize, .class_init =3D riscv_iommu_class_init, }; =20 --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962857; cv=none; d=zohomail.com; s=zohoarc; b=cSY09YMrHwqj323CjVpiQOEvVLZEkX4NO8HR9xuCntyKD2wJuub9P24laMeNKc11sPBfBQWbjDxBeeP67Zyrr+kY0ujQYkIJqnoX4sXsxU6ADHRIn7fT0UG3Lm1JVJqyex9FC7+c2FQHJaRjMrgMjNxK/sH14PAOZtS3E2ffM/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962857; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7g1o79/xiI7Xs46q9zIQv9CFVhyUUYrJ+M0IIOYvaIM=; b=TRorHrxkMPK6S5mTHNOmn3akAJj7LSJKK+G9hnhBREjRjMm1LkbYhgT2Vo1lJgVBjsbjw+2BYp9xXmyJ8TG8wDcWRBOlW5TSPO0cgwESlgkmRMpItNfA5arzXpEF2I+MKn/wT96wr0bxtRx66B50b0q8Rohku4PsCxrCmhuuuis= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962857181606.0503054223292; Thu, 19 Mar 2026 16:27:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Mks-0000ri-0h; Thu, 19 Mar 2026 19:26:18 -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 1w3Mkq-0000rG-NK for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:16 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3Mko-0007ep-V8 for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:16 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2ad21f437eeso12358575ad.0 for ; Thu, 19 Mar 2026 16:26:14 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.26.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962773; x=1774567573; 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=7g1o79/xiI7Xs46q9zIQv9CFVhyUUYrJ+M0IIOYvaIM=; b=O1Duqzpv7RonYnY+NvPrewybF4YRgdwu8bYV8gAh10WQ350UUNHiWhk6sBo0ftp1Q2 5mpPHjqzGtNBUCDVppQyjV6xMkyPo0axNAxNF0MmQANb0yIguEEkliRHS14JbGvc7bg3 kJUJ0kmjefY7Bxi5Z1VpRjckv+0xfvkyqh9hJ8v26Ep1RHCIUlnTdMwEveGux/D0Y+AN saur7jua1v0xn52EFXj3K+2rH8BTOnSE41JvKiFNUxIbMh8GYFcRCQkEa53pSzM5hJNS POS6dhzmXi3l/zkEqwrLmZfI8rqYQJ+BphWSzMJSUr+jdhLZsx3dNWpywDuH0Q6fFQvg jTig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962773; x=1774567573; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7g1o79/xiI7Xs46q9zIQv9CFVhyUUYrJ+M0IIOYvaIM=; b=bPYG2npvMwgqVKSmDie9cuh0Ljt4azRecRD6x2uz6p3oTNOEtlmRaH14JFhMDUeKnS tPkg8GRdFdf6FjCZmYOaGNlAg4Nj/Vt14Sxk82uDD5s94Na/pCrlONP5tOqDXMFJroSl mSS9Pa9Ap35wCMm6eC0n3B8Pulr0pLGy032mT67bpSvYs8QGgLtbKCUuW7quld9LSsQH QBCPhspByJidbTq3Zt5//0rl96ZMF7H13iUqAZPUulAbSJ6RUmiNFQuKnaTqADlfN28b OkBDC2pRfNxbhPZQUPz/FcgGbWx6nDKzDPsxjIO1EN+6qryogNIEEeH6k8yRmfLxoMO8 8vSQ== X-Gm-Message-State: AOJu0Yx88U1DHIdPDMAE1KXFFAQTxp8a9cD/mxpZXnOrZfBFCAH18Rrk veJoZ698Np5ZCXfBsN38hFW45Ci8StNPg+3iK7kqos7SimDyFP4M1VRo43AFCw== X-Gm-Gg: ATEYQzyuovGrz26MAppe2ZFjgDYVFBN+hytli6FonR/YkDsxZfUQLTzaQ7QsGTzGxpX DtusROxBwjTmWgIQzXMZ1bfIC3uWqn5nXYaQraBjIC//Zc3QCql12tvDDCsT5w2rxVyl0iPUGqb FtmCkCcxAcw3L+VN+k1EOpDbrBSeFvsXHFc3u5HSKijAO469dDF7mAvB8+Wb9uitaVkugHlhLot oq2rdfJjPUmzWioZYFNvfprtCBy6KHCtGbmryBG1UycjwzLXJ5877RlCJzoOIXKMU42NFW1Ix8E 916Mz0/Mp0/LFQsrkBKPsSAXlyLvbrs6qBF4PPwtINa+Mrjdy+eNRjsgSs6TnRpkhbxqkHvZQwS RzWTO2z13akqXCawjudU4Kz2kOIRO02JzyQHZGFrl27OcNEBt9niojRpdM2KqmnmeEv3N8pK79D 0IEUntOavhmflgkjHd1Oe2oc043KiQLEpq0dTY6V4DbrXwj6sYPMqH X-Received: by 2002:a17:902:ccca:b0:2b0:53b6:d0a4 with SMTP id d9443c01a7336-2b07717eda0mr39169455ad.12.1773962771658; Thu, 19 Mar 2026 16:26:11 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Jay Chang , Daniel Henrique Barboza , Frank Chang , Alistair Francis Subject: [PULL 10/17] target/riscv: Support Smpmpmt extension Date: Fri, 20 Mar 2026 09:25:15 +1000 Message-ID: <20260319232522.1867400-11-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=alistair23@gmail.com; helo=mail-pl1-x636.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962858488154100 Content-Type: text/plain; charset="utf-8" From: Jay Chang The Smpmpmt extension provides a mechanism to control memory attributes at the granularity of PMP (Physical Memory Protection) registers, similar to how Svpbmt controls memory attributes at the page level. Version 0.6 https://github.com/riscv/riscv-isa-manual/blob/smpmpmt/src/smpmpmt.adoc#svp= bmt Signed-off-by: Jay Chang Reviewed-by: Daniel Henrique Barboza Reviewed-by: Frank Chang Reviewed-by: Alistair Francis Message-ID: <20260305034429.74739-1-jay.chang@sifive.com> Signed-off-by: Alistair Francis --- target/riscv/pmp.h | 1 + target/riscv/cpu_cfg_fields.h.inc | 1 + target/riscv/cpu.c | 2 ++ target/riscv/pmp.c | 16 ++++++++++++++++ 4 files changed, 20 insertions(+) diff --git a/target/riscv/pmp.h b/target/riscv/pmp.h index 271cf24169..467fb6b4b1 100644 --- a/target/riscv/pmp.h +++ b/target/riscv/pmp.h @@ -29,6 +29,7 @@ typedef enum { PMP_WRITE =3D 1 << 1, PMP_EXEC =3D 1 << 2, PMP_AMATCH =3D (3 << 3), + PMP_MTMATCH =3D (3 << 5), PMP_LOCK =3D 1 << 7 } pmp_priv_t; =20 diff --git a/target/riscv/cpu_cfg_fields.h.inc b/target/riscv/cpu_cfg_field= s.h.inc index 70ec650abf..cd1a5ec56b 100644 --- a/target/riscv/cpu_cfg_fields.h.inc +++ b/target/riscv/cpu_cfg_fields.h.inc @@ -59,6 +59,7 @@ BOOL_FIELD(ext_svadu) BOOL_FIELD(ext_svinval) BOOL_FIELD(ext_svnapot) BOOL_FIELD(ext_svpbmt) +BOOL_FIELD(ext_smpmpmt) BOOL_FIELD(ext_svrsw60t59b) BOOL_FIELD(ext_svvptc) BOOL_FIELD(ext_svukte) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 9be79622f4..8ac935ac06 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -223,6 +223,7 @@ const RISCVIsaExtData isa_edata_arr[] =3D { ISA_EXT_DATA_ENTRY(smcsrind, PRIV_VERSION_1_13_0, ext_smcsrind), ISA_EXT_DATA_ENTRY(smdbltrp, PRIV_VERSION_1_13_0, ext_smdbltrp), ISA_EXT_DATA_ENTRY(smepmp, PRIV_VERSION_1_12_0, ext_smepmp), + ISA_EXT_DATA_ENTRY(smpmpmt, PRIV_VERSION_1_12_0, ext_smpmpmt), ISA_EXT_DATA_ENTRY(smrnmi, PRIV_VERSION_1_12_0, ext_smrnmi), ISA_EXT_DATA_ENTRY(smmpm, PRIV_VERSION_1_13_0, ext_smmpm), ISA_EXT_DATA_ENTRY(smnpm, PRIV_VERSION_1_13_0, ext_smnpm), @@ -1276,6 +1277,7 @@ const RISCVCPUMultiExtConfig riscv_cpu_extensions[] = =3D { MULTI_EXT_CFG_BOOL("smaia", ext_smaia, false), MULTI_EXT_CFG_BOOL("smdbltrp", ext_smdbltrp, false), MULTI_EXT_CFG_BOOL("smepmp", ext_smepmp, false), + MULTI_EXT_CFG_BOOL("smpmpmt", ext_smpmpmt, false), MULTI_EXT_CFG_BOOL("smrnmi", ext_smrnmi, false), MULTI_EXT_CFG_BOOL("smmpm", ext_smmpm, false), MULTI_EXT_CFG_BOOL("smnpm", ext_smnpm, false), diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index 3ef62d26ad..5391caa59c 100644 --- a/target/riscv/pmp.c +++ b/target/riscv/pmp.c @@ -165,6 +165,18 @@ static bool pmp_write_cfg(CPURISCVState *env, uint32_t= pmp_index, uint8_t val) "ignoring pmpcfg write - invalid\n"); } else { uint8_t a_field =3D pmp_get_a_field(val); + + if (!riscv_cpu_cfg(env)->ext_smpmpmt) { + /* If smpmpmt not supported, clear the MTMATCH bit */ + val &=3D ~PMP_MTMATCH; + } else if ((val & PMP_MTMATCH) =3D=3D PMP_MTMATCH) { + /* + * If trying to set reserved value (0x3) for MT field, + * preserve the original MT field from current config. + */ + val =3D (val & ~PMP_MTMATCH) | + (env->pmp_state.pmp[pmp_index].cfg_reg & PMP_MTMATCH); + } /* * When granularity g >=3D 1 (i.e., granularity > 4 bytes), * the NA4 (Naturally Aligned 4-byte) mode is not selectable @@ -355,6 +367,10 @@ static bool pmp_hart_has_privs_default(CPURISCVState *= env, pmp_priv_t privs, * Check if the address has required RWX privs to complete desired operati= on * Return true if a pmp rule match or default match * Return false if no match + * + * Note: The MT (Memory Type) field from Smpmpmt extension is stored in + * pmpcfg but is not acted upon during access checks. Cache attributes + * have no functional impact in QEMU emulation. */ bool pmp_hart_has_privs(CPURISCVState *env, hwaddr addr, target_ulong size, pmp_priv_t privs, --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962790; cv=none; d=zohomail.com; s=zohoarc; b=FpOk21l3oFvynXbjwDiTzRkx309WiF8CWKwGHKh8SU4D6WOkbc/VGjErEa3mrmmQVCKchfM+kWr+5orw5Exm8/WE5FUsVTivWgtc5p7F2/Xx0xpxFm4V5wIhlC1jbcd2ekrSiBfUetVvadHVz8dhNoIV304bofFyo0472EXMQIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962790; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FSL75QHFg495FNiNbzzE12kqDvsWACd2HsK7ER6Leyc=; b=gFsLHkmmVtwnw/4it4EGBUlZioI7ZITSzNkC3yMo1Zu6ICKEqNkbgjlQ4ZBEI/mQqrYeZwe1EJBUpkbdp6EVsfVHY1UgB9cIk3sh2Hrk6X0323I1g2woMc1Ub+yxtxdS6axh+e5agaEhc70ZlXKCA3paY/l7Vsv39yKZ1QMTWc8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177396279009175.43643021659989; Thu, 19 Mar 2026 16:26:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Mkt-0000sI-Kq; Thu, 19 Mar 2026 19:26:19 -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 1w3Mks-0000rw-B3 for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:18 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3Mkq-0007hS-Nt for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:18 -0400 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-c742824e1d3so527095a12.1 for ; Thu, 19 Mar 2026 16:26:16 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.26.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962775; x=1774567575; 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=FSL75QHFg495FNiNbzzE12kqDvsWACd2HsK7ER6Leyc=; b=FjrpJeY9+0uUzdRhftlTXkqY/cM+h0O5uirNpTcXuApnpPd6usix6BNnJnKprM0xqB 8c4Xi43FCr685lxnmZfDsod4Sb9B6alDkKseVKJ3muD2fsaRhCqcwpqxUMUgP3D9/FXL QgpMOaoKV//4W460eRUidChQvwD7BF7A0rSSFnCQc3D1LnuGRhePbzcPEHmH56EUHSvc OERhDjDcTMYUigW4XvANmsVleFkJDKdI7VK0R31w8E/62VQze4e0ZekdqFxZrGmqTGd+ hPkQkxEiSFQNMgGv7Hyv6Q5aIlGRHAm7cw4RWjTQxLIBqjB+lFfDBiQd0iOqYpxcivU7 lBZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962775; x=1774567575; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=FSL75QHFg495FNiNbzzE12kqDvsWACd2HsK7ER6Leyc=; b=m034fHQDkVVisdph5ESxJMXNyxKXeOWIgjsm/WPhuBCPbdWpiWo56dKkm+6WB9pd8W lph458+tK899cmnrI5rEo2ewDUMl/dusJ35/9Ssu1dmbsVMqpk8k50AneaZlM7ICawLU PqncoVga6XqU8VGgcqyAX2aSwXrgntJ/IQxohy++aph/R7KbFkyA0AAuI0dWATr3O0Ul yqqaLLYT5afYo5kH7RmhGERg5c+ho9ImTAYgMZlQz5RweMGNHLFdQedrWlNt3FUkvhZv bCI85Ze71EIKCZIscxJtUPTC+DMK6BNxvconSiCQIm4mmMgTMuIk4iUBbveX14u/VMw5 a8Hw== X-Gm-Message-State: AOJu0YwmFJT7lQB7XLEfxnk4pLTDRmR+ghWRhogEMxNfRtWgYJvAT5p0 IJ8m5w19t3FjWghDAOZ+a98Y5hcbg1nlI2cTTRone15KGrVYY+uU8HZXBK0LRw== X-Gm-Gg: ATEYQzzFFye6EXzVqbB7xY61oKWMKips5ct62zPN2rQwtDZJoHluGODq8xyy9TorFyW +oPDC7iMKne8A/dU3bAxW6+DXydXRN/FetvcZ+A3A/WmhyfcG3Pig2N8Ej8e476uk820qi5w8yM 0ptsXdmz/QWc4UxgJoNH5Au2jIKAPQzrmIrQFEUN6LbL9UKbdz6F/4amK2tD1Ne7PV1KrZ6bbcK BN+W9T9K0aKwxx2SdnJmCmdbyf53nAU3dai74/vEy4Fy3HhspPg8AO2HgDIdAEJJZCUJHVLViY4 xENm2OlbQE20N56JJI92tfyJjc7rwshco/5ukwsiMg8nXC46F48nKVzvToRU0pH8tebXFMAUjAY jKWXPcnqxtfFSBWAv842DVAK8WwGdn7IoHFiQHiiwVBK0ipmpfBeriFsZ4ihgPtpbj0ZXmqv1Iu 9iZ4Wm+hOfTzj969gOryJcwC82DOHDulkDabD22YYKInunEVtMGuJ+ X-Received: by 2002:a17:903:2449:b0:2b0:5ec1:97c1 with SMTP id d9443c01a7336-2b0827107e7mr9200765ad.7.1773962774647; Thu, 19 Mar 2026 16:26:14 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Frank Chang , Alistair Francis Subject: [PULL 11/17] hw/char: sifive_uart: Implement txctrl.txen and rxctrl.rxen Date: Fri, 20 Mar 2026 09:25:16 +1000 Message-ID: <20260319232522.1867400-12-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=alistair23@gmail.com; helo=mail-pg1-x531.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962791971158500 Content-Type: text/plain; charset="utf-8" From: Frank Chang Implement txctrl.txen and rxctrl.rxen as follows: * txctrl.txen The txen bit controls whether the Tx channel is active. When cleared, transmission of Tx FIFO contents is suppressed, and the txd pin is driven high. * rxctrl.rxen: The rxen bit controls whether the Rx channel is active. When cleared, the state of the rxd pin is ignored, and no characters will be enqueued into the Rx FIFO. Therefore, the Tx FIFO should not be dequeued when txctrl.txen is cleared, and the Rx FIFO should not be enqueued when rxctrl.rxen is cleared. Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Message-ID: <20260312033201.1619554-2-frank.chang@sifive.com> Signed-off-by: Alistair Francis --- include/hw/char/sifive_uart.h | 2 ++ hw/char/sifive_uart.c | 27 ++++++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/include/hw/char/sifive_uart.h b/include/hw/char/sifive_uart.h index 414564b026..c78d9bd1fc 100644 --- a/include/hw/char/sifive_uart.h +++ b/include/hw/char/sifive_uart.h @@ -51,6 +51,8 @@ enum { =20 #define SIFIVE_UART_TXFIFO_FULL 0x80000000 =20 +#define SIFIVE_UART_TXEN(txctrl) (txctrl & 0x1) +#define SIFIVE_UART_RXEN(rxctrl) (rxctrl & 0x1) #define SIFIVE_UART_GET_TXCNT(txctrl) ((txctrl >> 16) & 0x7) #define SIFIVE_UART_GET_RXCNT(rxctrl) ((rxctrl >> 16) & 0x7) =20 diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c index af17cf9a6c..3ce6a4ee76 100644 --- a/hw/char/sifive_uart.c +++ b/hw/char/sifive_uart.c @@ -78,6 +78,11 @@ static gboolean sifive_uart_xmit(void *do_not_use, GIOCo= ndition cond, return G_SOURCE_REMOVE; } =20 + /* Don't pop the FIFO if transmit is disabled. */ + if (!SIFIVE_UART_TXEN(s->txctrl)) { + return G_SOURCE_REMOVE; + } + /* Don't pop the FIFO in case the write fails */ characters =3D fifo8_peek_bufptr(&s->tx_fifo, fifo8_num_used(&s->tx_fifo), &numptr); @@ -106,11 +111,19 @@ static gboolean sifive_uart_xmit(void *do_not_use, GI= OCondition cond, return G_SOURCE_REMOVE; } =20 -static void sifive_uart_write_tx_fifo(SiFiveUARTState *s, const uint8_t *b= uf, - int size) +static void sifive_uart_trigger_tx_fifo(SiFiveUARTState *s) { uint64_t current_time =3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); =20 + if (!timer_pending(s->fifo_trigger_handle)) { + timer_mod(s->fifo_trigger_handle, current_time + + TX_INTERRUPT_TRIGGER_DELAY_NS); + } +} + +static void sifive_uart_write_tx_fifo(SiFiveUARTState *s, const uint8_t *b= uf, + int size) +{ if (size > fifo8_num_free(&s->tx_fifo)) { size =3D fifo8_num_free(&s->tx_fifo); qemu_log_mask(LOG_GUEST_ERROR, "sifive_uart: TX FIFO overflow.\n"); @@ -124,10 +137,7 @@ static void sifive_uart_write_tx_fifo(SiFiveUARTState = *s, const uint8_t *buf, s->txfifo |=3D SIFIVE_UART_TXFIFO_FULL; } =20 - if (!timer_pending(s->fifo_trigger_handle)) { - timer_mod(s->fifo_trigger_handle, current_time + - TX_INTERRUPT_TRIGGER_DELAY_NS); - } + sifive_uart_trigger_tx_fifo(s); } =20 static uint64_t @@ -184,6 +194,9 @@ sifive_uart_write(void *opaque, hwaddr addr, return; case SIFIVE_UART_TXCTRL: s->txctrl =3D val64; + if (SIFIVE_UART_TXEN(s->txctrl) && !fifo8_is_empty(&s->tx_fifo)) { + sifive_uart_trigger_tx_fifo(s); + } return; case SIFIVE_UART_RXCTRL: s->rxctrl =3D val64; @@ -231,7 +244,7 @@ static int sifive_uart_can_rx(void *opaque) { SiFiveUARTState *s =3D opaque; =20 - return s->rx_fifo_len < sizeof(s->rx_fifo); + return SIFIVE_UART_RXEN(s->rxctrl) && (s->rx_fifo_len < sizeof(s->rx_f= ifo)); } =20 static void sifive_uart_event(void *opaque, QEMUChrEvent event) --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962871; cv=none; d=zohomail.com; s=zohoarc; b=BgVBB6jL4SVq03A9meo0byeNNDow6jQpxalqhvIXCyZzXVEbrub2IG/jiz/a0hOheNORWeKdF/2kf1bnk4VZ2rr6H1DNTaAn+bN1vFx7c5ur5ejhQAXL6YwfS4HR1aeaVbSW9RchNvug1Gh0I31vEQY9DGbe7nm+tLc0EoHLZRk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962871; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rk9qu+43yuAwQNmV+HOd24mU8ny8bR4PCXHORU3AcGI=; b=NiPUGlFoSOAhRcDoJscQ+JgM68UOgjgK6Fo50T37vC+1H7ZYU7adrMvTRNyGzvK+Y2Z/phA7uqw25Gwg6BNDVLAMPW2ZHRJlqIFCw+VT8rHhQMYrhhwy8tt4LICyzwCkciy1ttzZKEdSTdqooayBN1U6NTCOaV59Yu2sNKZDuWg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962871360238.03260829794056; Thu, 19 Mar 2026 16:27:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Mkx-000102-4A; Thu, 19 Mar 2026 19:26: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 1w3Mkv-0000sv-4h for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:21 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3Mkt-0007ht-I9 for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:20 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2b056b7f783so7079595ad.1 for ; Thu, 19 Mar 2026 16:26:19 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962778; x=1774567578; 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=rk9qu+43yuAwQNmV+HOd24mU8ny8bR4PCXHORU3AcGI=; b=nd3SxwTFEz2RixrDv/348UglldLOTBaTjIoMAKwAryTk46OJAYzgiApZgEyyP5giQt fFWViMUQev7gMT+qXNG0svFFmnSgjLSCZTemQrW+vkdNcfabvSYd1W5NZFn1xis3AkVI dp2MGmsSkDlMaCH/B3U2YrJSZ6BYnoFJn8QL7q26UUq1VWxMntnF/CHQizkgZSILoi8u eWRKtnMo3DzsEVhs4n3A36kQwEhCmJcJCgRcIWz1hwwse/EFUvJgorOgSVXzFr4qsyDt 8cHTxOgcJ7pfdzhb7PDKPV3bfE/bz3HGZSfHEGFyoO42yG4ctQaWhLFQzzz66U2BaRoW 0ysg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962778; x=1774567578; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rk9qu+43yuAwQNmV+HOd24mU8ny8bR4PCXHORU3AcGI=; b=aBj1LnwP0EqQezJQNzia8/wM/83v0A4ynO6/ijsYYVHNdz/y1Bd67J1KrVELlD0slm hbEtrCwiFPuhk6HYVQeSJADUUQ9se+L0CdjarA6Pq4HCOiVgQtKiDJ/M/kbS6c3UYUdT wcAmKPzkMuEBOFu46IGTSnBjrx5Hi1LIECJC6YvY8X4UtYv2fq7226uL9P4VNSKlGjug hIgLx+ymO4Jub/AY8HmQMGFF2rpmSC9+eQSAc0XiJQZqP+TyYAeDitQyZmNyTH/PzGqv 4A5uCOrS8vbbt/+ArdXAHq/Vav39aPIooS+gZEaXWwniibVDPPfr+4Aq5Gk+sVHaN1J2 f7Eg== X-Gm-Message-State: AOJu0YxrgqFb+ZTmzIjMSJsHXDrQ3P1K9QuFt8nyoH+kLnVMruL/hGtr So8a3mYMwXwpYjZJIB5VB4G7/qYew5bmzC2v3HENR9S9FaEBRamMyFMPw0/uNA== X-Gm-Gg: ATEYQzyD/k362tzI6mX5xFnAierx7xX9qrE+wyNBmjF/kRc5OijAUsIiBE7Br7humtv jUOhx2yhgjmxwgsYWbcDAaEUCpFcxRiF9udB1mRxmskLpO2mDX3ObZLpVW8pt14SSQx2tpZC8uM MfjfzP99la2+nLiSkEjNtaXEOjEqhCBXpRejxdKbdrt0k7Kw9ysx2oFUWdTu+54dKH5lAfSkHiL //XEnvNkMUalJJJz4ykwuqX1Jp0dfS3Hml8FjYxZhoickCZ6jWQP/TJADrKIavWrn0VFA6v1Ltp Oyi2Ngg0C6NZxY8oJ8kVsbVaq1UNEvn2i2+NdRr7oE4Ad3QrzNqIXMYKioCpVrPqlDEb3uTJ2/3 vcGLj8Gik1122ndH9rLntz01dRWoER2oM7DRWjNTxFFNJRGZCEltD2C+bNNNH1kXTj3wZZQdIPt 23lcZUSswhtOj3Pp6JQdfG8rqkuW603H/vNfVXEZo6kA== X-Received: by 2002:a17:903:388d:b0:2ae:5346:d4e6 with SMTP id d9443c01a7336-2b07725f8cbmr51729315ad.28.1773962777687; Thu, 19 Mar 2026 16:26:17 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Frank Chang , Alistair Francis Subject: [PULL 12/17] hw/char: sifive_uart: Sync txwm interrupt pending status after TX FIFO enqueue Date: Fri, 20 Mar 2026 09:25:17 +1000 Message-ID: <20260319232522.1867400-13-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=alistair23@gmail.com; helo=mail-pl1-x629.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962872183158500 Content-Type: text/plain; charset="utf-8" From: Frank Chang Currently, the txwm interrupt pending status is only updated when the asynchronous transmit handler runs. This can cause the txwm interrupt state to become unsynchronized between the SiFive UART and the interrupt controller. For example, when a txwm interrupt is raised, the corresponding APLIC pending bit is also set. However, if software later enqueues additional characters into the TX FIFO exceeding the transmit watermark, the APLIC pending bit may remain set because the txwm interrupt pending status is not updated at enqueue time. This issue has been observed on resource-constrained machines, where Linux reports spurious IRQ errors. In these cases, the asynchronous transmit handler is unable to drain the TX FIFO quickly enough to update the txwm pending status before software reads the ip register, which derives the txwm pending state directly from the actual number of characters in the TX FIFO. This commit fixes the issue by updating the txwm interrupt pending status immediately after enqueuing data into the TX FIFO, ensuring that the interrupt pending status between the SiFive UART and the interrupt controller remains synchronized. Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Message-ID: <20260312033201.1619554-3-frank.chang@sifive.com> Signed-off-by: Alistair Francis --- hw/char/sifive_uart.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c index 3ce6a4ee76..ae71a15a2a 100644 --- a/hw/char/sifive_uart.c +++ b/hw/char/sifive_uart.c @@ -124,12 +124,20 @@ static void sifive_uart_trigger_tx_fifo(SiFiveUARTSta= te *s) static void sifive_uart_write_tx_fifo(SiFiveUARTState *s, const uint8_t *b= uf, int size) { + uint32_t txcnt =3D SIFIVE_UART_GET_TXCNT(s->txctrl); + bool update_irq =3D false; + if (size > fifo8_num_free(&s->tx_fifo)) { size =3D fifo8_num_free(&s->tx_fifo); qemu_log_mask(LOG_GUEST_ERROR, "sifive_uart: TX FIFO overflow.\n"); } =20 if (size > 0) { + if (fifo8_num_used(&s->tx_fifo) < txcnt && + (fifo8_num_used(&s->tx_fifo) + size) >=3D txcnt) { + update_irq =3D true; + } + fifo8_push_all(&s->tx_fifo, buf, size); } =20 @@ -137,6 +145,14 @@ static void sifive_uart_write_tx_fifo(SiFiveUARTState = *s, const uint8_t *buf, s->txfifo |=3D SIFIVE_UART_TXFIFO_FULL; } =20 + /* + * Update txwm interrupt pending status when the number of entries + * in the transmit FIFO crosses or reaches the watermark. + */ + if (update_irq) { + sifive_uart_update_irq(s); + } + sifive_uart_trigger_tx_fifo(s); } =20 --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962834; cv=none; d=zohomail.com; s=zohoarc; b=SfKEznAwRLUUazUTm0HFn3iFPzv5kdtRQNElxMLHQXRijoqQLjijwT0Xi0FwEmOkPCjmTa/9n0ARtm4MO/Wn7Wu97VLS+CutbdDG319QtyHINdYNkLJG7Y5YaZ/SGDG9iKyc2oNeuMfeu9pHxG+o8sfd43J2A+eiWcDHorolqpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962834; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0+0x6O4gZwnc0GCjlyoKzmEsRAKxwFxCRzvQROS36aQ=; b=iRqspR7+5QxxhrCK3T7bOy/uq2z/qz9OYxo8r+Ma840PM3EQkzKHPVMk8nUdLzrIraAw19Aea/ASCbJNQ0mKb3AxjqcZ0GaDIrgq8+Cg0y8Y8b4JcrDZ9YF52/Bbxye3GqM0kvd37qiI5ScxFdURr1llRGDTOtZUJNzlTtX8h4U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962834103538.3213735239353; Thu, 19 Mar 2026 16:27:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Mkz-000127-1Z; Thu, 19 Mar 2026 19:26: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 1w3Mky-00011e-48 for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:24 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3Mkw-0007iD-N5 for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:23 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2b0586d5bb8so9094925ad.3 for ; Thu, 19 Mar 2026 16:26:22 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962781; x=1774567581; 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=0+0x6O4gZwnc0GCjlyoKzmEsRAKxwFxCRzvQROS36aQ=; b=c7EXkeI5BVTz4/L3X15k9vF/ww2ZnLJ9jDtfUCscXdqRFNmepYUWf45Be8clnydAt6 dFtPnSa/Y21EYuSAblyMQ0au7bnptAiz1ZeLbT/qkmFYl7RtktLXW4zMyg9/PKDJfbFE 28laITUy+v+cYKApUmynJ8vf2tO0UIsBxCzQsro40S4YCLe2PCMg7fZbW6PivHrwD2Xi lPnzBgGpc8i3lf1vTzJujk5mIgY0xcU7/eEYP8vSjCmf/53cqxXY2UKlDI+XAh2xEDhA BZIGWtgMBMZ8o7l+7KYMzcolAgz3VrsiuFJqiISW41TWCSFcBCH/8MR5oLGq0Z78U1II 0VCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962781; x=1774567581; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0+0x6O4gZwnc0GCjlyoKzmEsRAKxwFxCRzvQROS36aQ=; b=eZ2XnSK364nAcTatr7WdbFJu8+6sofWktKVfO87SLIiMmdyIZBmANR0L/L1U6ETBmn f/2xIyUXf4ysmqz7hVOvoNkcWSHfzMkkgmwGZRhaHiagYmCN5HDuJnpn8zs8JX/WzJdF NNij1saNIK/STSJgq4hUNQ/8uESDjZutbizYVZaOYQnfMuTO5Ooqr/PT4uEMUlxzPS5h fIHGRPPiDtf2RB7ntbqFFo3+Iv5/SFceIdxXPfdMaMzH4iG8dw1xHZjrBdCHsvAnglxu GTtrKneEi0WL3RsEnMMr/NKD7e4Wtxm2ytUwltTzslg7b1yAqzLqLQjPAHgIMXzXovg2 VbAw== X-Gm-Message-State: AOJu0YwpVM64IhrWv+YYxs9oZzUIe4MVbm+KBqDFjOhokdpqblWRuQQH f7sWLmQOfM8d+ccwttGOojo3861kVKVIeRQZmbyS0XF3hpnzz9przOyodMaA5A== X-Gm-Gg: ATEYQzznJdo4vo81BKzJzny2RDq4FA1mLArBDkcd/2nZkDfxJ+4lUbkh8QtpwmyjJDx iudYhzZDVCpgptxefJ5yve5LMiIsTu3gohOwcqJiSZBoKrhXgzRxTOifpnCxSN2FIzdXcwiuff7 IRf8kBurdySWOVT5VWKIc4o/7m4ZSORabXLIfQOh6je9RLUsbI5lHSfxuhuWxno414H6MGaLJU7 t/oDqK/cV8cmHcdiwxd+OEJkEOMAKr71JnnVH6vp455EY4mFeThhOgIQWaY/dilE3EOoqMV/M+e jHhX7O9SCJ6rVjEcMX1KxzjUxUwDrUPSRAsWx8Ig0dF1ELxLfzLSxndFx6HB0plZjpi4pvA9DIW xzqyRG1SznCtQgO/76ncl0MEZrpvBMRfA+o/w3r0Cxx+9eKwFRmmI4BNkN5KnOwJ7kAftGFyV2T JsOlVZl1XmIHju6sjKKZWI0njTZHGQnjnS+vROtDeQDw== X-Received: by 2002:a17:903:19eb:b0:2ae:aca4:b177 with SMTP id d9443c01a7336-2b0826c696bmr8449675ad.5.1773962780832; Thu, 19 Mar 2026 16:26:20 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Frank Chang , Alistair Francis Subject: [PULL 13/17] hw/char: sifive_uart: Update IRQ when rxctrl is written Date: Fri, 20 Mar 2026 09:25:18 +1000 Message-ID: <20260319232522.1867400-14-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=alistair23@gmail.com; helo=mail-pl1-x636.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962836088158500 Content-Type: text/plain; charset="utf-8" From: Frank Chang When rxctl is updated, we also need to check whether the IRQ should be raised, as the user may activate the Rx channel or change the Rx FIFO watermark level. Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Message-ID: <20260312033201.1619554-4-frank.chang@sifive.com> Signed-off-by: Alistair Francis --- hw/char/sifive_uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c index ae71a15a2a..f255cca960 100644 --- a/hw/char/sifive_uart.c +++ b/hw/char/sifive_uart.c @@ -216,6 +216,7 @@ sifive_uart_write(void *opaque, hwaddr addr, return; case SIFIVE_UART_RXCTRL: s->rxctrl =3D val64; + sifive_uart_update_irq(s); return; case SIFIVE_UART_DIV: s->div =3D val64; --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962860; cv=none; d=zohomail.com; s=zohoarc; b=ZgHCPtm3vLWZ6rWMcu6NV+so6s0Vvrt4PsH87j4WgzL2F7iN3qhsTTr5ytuWkAUfrJ4Ydw+OCF+y11DQR88Oo6+DgFJyZyehRYcdvYUdN6qoGEEQZGE+DDquXX1zrDdGU9xMD5w+pfyfuYMCslEt7lItaR8tFj1ijEFcjfRz7Fc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962860; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JEb8zTJzS/m1p8rg1ZAG9mFLhEcaPRnQLFl3tU6IqbU=; b=Vx2ZKSpcJ1DvnE/BO9k7DK4nBVTE9Due7dxsiZYGCkvnsOhlQOfPq8DYnVQxf96Gz5i+qK3FZMso5aYt5oBJUfxSH8op0VTgYWE8GVJMb1c0muBZOgjEalp+1EiVu3nDgXdmtZ3cVf7NDt26SOuqnp5IN8U46664CyX4tyS6Bt8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962860855537.6179497167087; Thu, 19 Mar 2026 16:27:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Ml3-00014z-Jw; Thu, 19 Mar 2026 19:26:29 -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 1w3Ml1-00012u-IF for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:27 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3Mkz-0007iO-Ul for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:27 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2b04e6a989eso9796685ad.3 for ; Thu, 19 Mar 2026 16:26:25 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962784; x=1774567584; 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=JEb8zTJzS/m1p8rg1ZAG9mFLhEcaPRnQLFl3tU6IqbU=; b=KYHKpiwYpK5Z6h/OO/dCIU7QV1WcZUohwRTo1aqG5MH8tzdXQMNuRrkEhIfKlE1yEi A5FuTvsM2K77yAUsGXSgW8XzzCydFktERuCgaJg5TynVkO1hEXUrQbJlCpJFX5mSg2u0 m1mb3jyVVlJ3G97nhtz2eUdwtxqS1V/72YYiOYjdu/ILuC+FGURrZxPNOpUpP12/zxX5 KMbfV6sDz9n89sE1jKdkTAMCTo8mF+FcvTc2cQ2K++2VGHWliQ7zyCGzwjXsIr7Z48AF 0w5xOkUCWVIrL7kh+wDSCTJ14jZGPMJvKBN4DeDz83dh4etOUTQNPYtB3crygWF85snd WZtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962784; x=1774567584; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=JEb8zTJzS/m1p8rg1ZAG9mFLhEcaPRnQLFl3tU6IqbU=; b=gvKjnqZitDZzL7tmsYDYfk1hpJiUJ4En8VLDdWmK8zWHPDMYb4mzA9g6EmvaSTRQbU FwAZ9qXAjwOwtYP6mW2wPen6s/RUYjtNMI+5no9nPUqRQL6iYNKyPFEmHEfvQqz6YEm/ xTxxfigamUNga4v0ccalrmzevaZEVHKG1hd8Tbk9VqxlA91P9rNa7jArlrxV0tzudalh sU1sJPAEw8UnQN3LctQJ9R7Gmh4J0tRB+guucifn8XG4dPJ+4fUhlr8EVi+2HoVJ0BKa A8bK1VKvUrzY1Tlq9+ssRx+06cU9/fl0RfQA4k7hmiPVT9mwjGUfPGik41GL5l1o8Skw YVOw== X-Gm-Message-State: AOJu0Yw+rGZOr36ZAXHrJ6ANqPUdmXjwblE3JyKJMvjBM/+b+Mav1XbF eRgY7Wl9CQIgEAjRs9ag4Yw67vOkq9wWxw/OppXZ6OqxNo01CDQPV+TBnR8tOg== X-Gm-Gg: ATEYQzyXfOtDKVoSZV52yppnkmjeJQOQTWoWHDM3fnxe3jpoPj7SUZsjDluVZKX1hdK YQm+5Hhb+92Ddf7Pdp8/zX3AQf1BDsGPhZbBPAF7gSQbcGwB9SQPuHeD2AAPAdVnTwBIjesOCpF 8konvPAc2abhO0QfUWrP5A8hRA6bCyvTNRxHL6YSKj0fcKkVOLIJ6FXJgqpEJ0Uywu7S3RRDPO9 jJnnifhV4ULUBo0Cqu4LIucA4vyMfwd9imuDW9aAHyOk/Z1+rI9k4XLYSEWqjL8zlh8zfZAm7sZ +nvMD++X4CCtM3nQiDNg9W91Ok4jPU/eOsjJDlHo4Lh0WHyAh4FW5NnUURrCrOiPZLYZ9Q4zIeA 9zhmRsfeoUgAypPJ1cA91jp5klHlaMS1MFHkaMyNW8PRFmLa1AvgcsahEJTgHbTyqK/8XSa4+Vg d3RtWPgO61U8nOm6zyySyujhYsaVGZefuvgQahFHQLEw== X-Received: by 2002:a17:902:f60d:b0:2ae:829d:3c33 with SMTP id d9443c01a7336-2b0826c3d65mr8041215ad.8.1773962783900; Thu, 19 Mar 2026 16:26:23 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Frank Chang , Alistair Francis Subject: [PULL 14/17] hw/char: sifive_uart: Remove ip variable Date: Fri, 20 Mar 2026 09:25:19 +1000 Message-ID: <20260319232522.1867400-15-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=alistair23@gmail.com; helo=mail-pl1-x62f.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962862447154100 Content-Type: text/plain; charset="utf-8" From: Frank Chang The ip variable is no longer used in the code. Remove it from the codebase. Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Message-ID: <20260312033201.1619554-5-frank.chang@sifive.com> Signed-off-by: Alistair Francis --- include/hw/char/sifive_uart.h | 1 - hw/char/sifive_uart.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/hw/char/sifive_uart.h b/include/hw/char/sifive_uart.h index c78d9bd1fc..5f3b1327de 100644 --- a/include/hw/char/sifive_uart.h +++ b/include/hw/char/sifive_uart.h @@ -73,7 +73,6 @@ struct SiFiveUARTState { =20 uint32_t txfifo; uint32_t ie; - uint32_t ip; uint32_t txctrl; uint32_t rxctrl; uint32_t div; diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c index f255cca960..4c30fbf568 100644 --- a/hw/char/sifive_uart.c +++ b/hw/char/sifive_uart.c @@ -285,7 +285,6 @@ static void sifive_uart_reset_enter(Object *obj, ResetT= ype type) =20 s->txfifo =3D 0; s->ie =3D 0; - s->ip =3D 0; s->txctrl =3D 0; s->rxctrl =3D 0; s->div =3D 0; @@ -343,14 +342,13 @@ static void sifive_uart_reset_hold(Object *obj, Reset= Type type) =20 static const VMStateDescription vmstate_sifive_uart =3D { .name =3D TYPE_SIFIVE_UART, - .version_id =3D 2, - .minimum_version_id =3D 2, + .version_id =3D 3, + .minimum_version_id =3D 3, .fields =3D (const VMStateField[]) { VMSTATE_UINT8_ARRAY(rx_fifo, SiFiveUARTState, SIFIVE_UART_RX_FIFO_SIZE), VMSTATE_UINT8(rx_fifo_len, SiFiveUARTState), VMSTATE_UINT32(ie, SiFiveUARTState), - VMSTATE_UINT32(ip, SiFiveUARTState), VMSTATE_UINT32(txctrl, SiFiveUARTState), VMSTATE_UINT32(rxctrl, SiFiveUARTState), VMSTATE_UINT32(div, SiFiveUARTState), --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962850; cv=none; d=zohomail.com; s=zohoarc; b=SKftc8SL7kiMXMd93FrkSKGkj/yrhdTJyPQON8s5lMeiD46vQLiLjl6AClAM+4pM2tukkKRSej70gTXfZSTpixIncQ5j74WVTdz2DSsc62uNa8DbwpKam9Z1Ovo4k1XPcHUZ/CCfcEixxg6O22clsjVBpOmdzvsbTa6m8aFIuqM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962850; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/7f9dMZ9wc8KgRYCidnrt4ZZyx/f2C93NARKjYDXY2w=; b=TfupdJkjjSNzxkNVntsJ4jwSqajUttf7eCB6smPtv8ufETJPfmK8qc8hvxSyCUQ/tGFQyZExGfveXuaPvUTTAYhiNN+VMaZ472uAKhuL6RAoWX2nDhLMXiXaik0HoJXCNtysUChdetTPopXYWoRNKIMxsK+AJ8c8f2CCg+d5SRo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962850170675.145695394689; Thu, 19 Mar 2026 16:27:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3Ml6-00019C-M2; Thu, 19 Mar 2026 19:26:32 -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 1w3Ml4-00016Y-L2 for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:30 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3Ml3-0007iq-7m for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:30 -0400 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-35b95e21ccaso1159566a91.0 for ; Thu, 19 Mar 2026 16:26:28 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962787; x=1774567587; 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=/7f9dMZ9wc8KgRYCidnrt4ZZyx/f2C93NARKjYDXY2w=; b=FAwcuNTrpLvLtmEdUV1NGLeK2rlINgkCmv4xIqDTctgaPg122vEtaahb/JkK5lCrAo o63mjx0wMS7E0LmpZ1+o4nm3jYlZMh+7rMmRU6iSPolL17hW8U1ns8boJH2K8jPdXwoz 6bAXiD1P4M935bg3PzDZIdws3Bkh8TSqFsxvWtJsX6y1syYg+zv9IiTRonv8TWB+nOrG 0SbdWaSuSxyQ2nTLrf9uObFebjXNmAdYy5XN7Yx/vsAlI+EOR/TDbIjEVmGL1sHTJcgV fL6l2TrW5UndAclIWpmA+NaT6xTRgmgqNtvmliBCDhjXI4TQOd1kFMz5muhmwYmI94yA 1WOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962787; x=1774567587; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/7f9dMZ9wc8KgRYCidnrt4ZZyx/f2C93NARKjYDXY2w=; b=k8M/LRTu2UM/iCUOgOt6cbOfbfmkRZRbAEOBY7aRzL1PxV6weHCv/Vk5VuPoTaUDKw d6IF7f8WUWpmMLLFZRX+TVJ7FcfVCrBEJEpSBRUSKivqwz9Nc616vkDGmkibPuCKn0c9 zSjrEt3U28RAJ59r5Lw7AEXWF0plV5Y+5qxkRZQCasGw6qhkagbVZr+ztDb78iKpnJvP +FNxnRG3LNUwGfkZjQ1vpQ/VHYfpe4wNqjRZjA+v3LJG0nNfybiQI0KO0hBE+mOLCKHK XKUgssDwz9oMhfAQr1I12lo92QU1Nu7ReCROg8espe4vESSmi6G3a6o77glCroJTJyT8 +/8g== X-Gm-Message-State: AOJu0YyiVuGrbSnK4Nmssw49Bx5WjFa4zusmLhFkr9Fknp6iPCNzCaGV +akln2KMAD7UQvrSz0PLv/oI02tnWZNZ/AbqPPDrzgYMgnJwhqrk4PoK4ICtlA== X-Gm-Gg: ATEYQzwNMbQZE4Dxdn3ZK6Zya1lPCkpla576CL9wrgUFpRCKTHbl4CU/JcRxmB8pCcd fAlb5ujcwDtTc2rikKYM6YW9pxdj0oKSak94TelMXsyYtjwJxIZ2R0VcyVolopaotjHJ/8UuLdj C2ak18wFzycj7jH+Up/YAnl49e+lk7HM8//RKAL11Qal8bzaMtf/8ubj9LOV7kU/tjwYY2Ac57o WgwTS5fB3ESUYU6MBxk/Quc+q8OHaPgDXIu9TFO17K2D43cSmDitfBHlTWpNDFKVnSXVQKUAsrl 7WHBrjAYlIR67jWh4RyHAjfrhwlgjGUCQ8mdRElTj8bkBYAGyjimKJsrflw5N68dumwipAoUqyu Ow+u9dSlQ0Yl9Af0I0SYUNnbRxdhvAlVXqV9bOjOEmK/gz/6uIVxu0zSx6vdeogDH5J+uRrLFMN /ODXOFZqKQOxrxteRfT/PnzhlwDUYVH8DOyPKHwcXPEY/laCQWpyTx X-Received: by 2002:a17:902:d2c9:b0:2b0:52dc:f1c1 with SMTP id d9443c01a7336-2b0827bd48fmr7486885ad.16.1773962786984; Thu, 19 Mar 2026 16:26:26 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Max Chou , Alistair Francis Subject: [PULL 15/17] target/riscv: rvv: Fix missing flags merge in probe_pages for cross-page accesses Date: Fri, 20 Mar 2026 09:25:20 +1000 Message-ID: <20260319232522.1867400-16-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=alistair23@gmail.com; helo=mail-pj1-x1035.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962852390154100 Content-Type: text/plain; charset="utf-8" From: Max Chou When probe_pages probes a memory region that spans two pages, it calls probe_access_flags twice - once for each page. However, the flags from the second page probe were overwriting the flags from the first page instead of being merged together. Signed-off-by: Max Chou Reviewed-by: Alistair Francis Message-ID: <20260318013805.1920377-2-max.chou@sifive.com> Signed-off-by: Alistair Francis --- target/riscv/vector_helper.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index caa8dd9c12..e60248d6d3 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -151,9 +151,9 @@ static void probe_pages(CPURISCVState *env, target_ulon= g addr, target_ulong len, addr +=3D curlen; curlen =3D len - curlen; if (flags !=3D NULL) { - *flags =3D probe_access_flags(env, adjust_addr(env, addr), cur= len, - access_type, mmu_index, nonfault, - host, ra); + *flags |=3D probe_access_flags(env, adjust_addr(env, addr), cu= rlen, + access_type, mmu_index, nonfault, + host, ra); } else { probe_access(env, adjust_addr(env, addr), curlen, access_type, mmu_index, ra); @@ -161,7 +161,6 @@ static void probe_pages(CPURISCVState *env, target_ulon= g addr, target_ulong len, } } =20 - static inline void vext_set_elem_mask(void *v0, int index, uint8_t value) { --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962834; cv=none; d=zohomail.com; s=zohoarc; b=CWySMkFNGQIOCoT3MmjjeyEfVLaipk+vwBlBj34gDCog+ywlmF1a9N9pcACsaAL5wQwfiKhfkopxtP/6Vz/s9JNsmpn5gd7+VNZGV8luTWsGqxSyoCM9GSB026+8dFnacRlI+sRoHOsAwx4CbG512SZ8puyn+s8W+coPwxGFj9k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962834; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5tJUDngHbr1KPsf6/Ca4HvKW/nIzxeybSJmdbm3AcVc=; b=j/sucgms7OREDCXvzbyXfIzaczhv1DYaro2VyywqBjPdJ5SoMPIhvR2IlfQV4zhxP/hGXz6i7nUStUSUxnJOW5xs1tzl1SO9uwaHnM7etOCMbZ0PuqD5ZLyZKwo+1/2e9a0N7+4p3Vqn7lGUBZAXoXRzHTOE3Vtrw+xpPso4hHo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962834443460.0363630028751; Thu, 19 Mar 2026 16:27:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3MlQ-0001fY-Vk; Thu, 19 Mar 2026 19:26:55 -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 1w3MlC-0001Qp-Pk for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:38 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3MlA-0007j9-T7 for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:38 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-2aecefc7503so8911175ad.1 for ; Thu, 19 Mar 2026 16:26:31 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962790; x=1774567590; 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=5tJUDngHbr1KPsf6/Ca4HvKW/nIzxeybSJmdbm3AcVc=; b=b2EOjBXyIBkr/HYMQTyJ0xHXPrw2nlW3NoEpbtDEROw3m0Rci8J+V1H2E3w/OpgJHx n/UmMlUEzPY8XHv0Xy7jaAtzvdM5OzsQPDo7NoDtyjv4tQEiLwjf9VpllzdOiqmKANZi si2aeN0SLAzZwl5hF9nWE4Pwmru4pQIzaIU5tkbX88BfGyHG3grYtiFavXW6TQEbhCRA ZY+G6UQOt1rxuFOEEdS34/mMMwCJO0Xd7iuArqxeLjSxWkJKm12drxHlMaXp4RtCcQtd 4KuetWrfmZtcs5qtt5s61Dai7gMs3bzXJCjC7srCdC6PrCkwj5FiMWRfLU2osRaGujY2 461A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962790; x=1774567590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5tJUDngHbr1KPsf6/Ca4HvKW/nIzxeybSJmdbm3AcVc=; b=bHmLINHKC86uUxt3F3PcGBPLTNF3+5ITSRnqL9+HJR9Hl0GyuzuTvS7l+yohY9ZI/R k/Rlovr0e4pqG2EzKHi0Pd8ljQNhodwL7OPq8ZOtlYPsb4uyqpTk9RLXbGelnMML5TMZ gYa8ycS4H4wBR60sUnt11q8CPBVdvZF+fKBKxCF+A0ol+/3LiPkolnLoG+bd7F+rwmXs 9LWLRPiq8oBub/ulByGPfzgM865pOquI0dvuwEut1XY+RGb1YBZCxLSZXb1MQPFnCY9/ X/FUfTLwBo/iOtpFzUu0vk01HSGCAyGPk70BDIWk1IRIbxdVFWVC5sQDP2na+vPsfSCZ FicA== X-Gm-Message-State: AOJu0YytM8PRf9pMxikI/I9Fci9qQDwFaHRsyEvPJvDOil8eaD/lKbI+ rbZv1Op9ES4bwDGAXy14TCeJhXLhD1bZsP404UCdt98rfMecRpLtHEXZpv+m1Q== X-Gm-Gg: ATEYQzyBzEQdo6PyLT8ojtEJ4qZXmhuzgpm9jhmllt497ELK+4GjvkR9t5HDB8m577W Wdqun6a3n4q8G2HxhkZ2zeuvL1ERHm1C5tJsYuyH4NIv0P/twOEBCwZ+vZUXcXH3yw5lQB8CEgo rdHYbEnPR2d0TdNNuAuEVU7nbA8MwpND6hLScZQV+4XnNKAu/D50KxrQYmg4TWuIScdyAlVQcas B5CF+y4SjI/gqSUZPfVLmAe44xaJvVCBky3Bla+XTKSY5Bq++vDkLo4ZlvYwAVZ6PcImcDMdCm3 JAplspgpuesPFCSZWjoS++4VtoN//V0KGmL8QoMcIC+rXjOk3Y1ij/CNiJAiTamaXVSdGpzOW0V uXqGeJQnJ/7Wk4rgTNe5IQ5z5bzpmdQeWqMr7dc3lOuRHakusegOB8vugOxpB3d+gmmittjl/uW raqbkWEdCWeRLtu28ZvA86BXy18+Szc2/76ysvIjsu8w== X-Received: by 2002:a17:902:e883:b0:2ae:5eab:132e with SMTP id d9443c01a7336-2b0826dd612mr7362785ad.12.1773962790185; Thu, 19 Mar 2026 16:26:30 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Max Chou , Alistair Francis Subject: [PULL 16/17] target/riscv: rvv: Fix page probe issues in vext_ldff Date: Fri, 20 Mar 2026 09:25:21 +1000 Message-ID: <20260319232522.1867400-17-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::631; 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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962836143154100 Content-Type: text/plain; charset="utf-8" From: Max Chou Commit 17288e38bebf ("optimize the memory probing for vector fault-only-first loads") introduced an optimization that moved from per-element probing to a fast-path broad probe. Unfortunately it introduced following bugs in cross-page handling: - Wrong condition for second page probing: checked "env->vl > elems" instead of "env->vl > elems + env->vstart", failing to account for the vstart offset. - Incorrect second page address calculation: used "addr + (elems << log2_esz)" instead of "addr + page_split". For segment loads (nf > 1), this would probe the wrong address,not at the page boundary. - Wrong second page probe size: used "elems * msize" (the first page size) instead of calculating the remaining size as "(env->vl - env->vstart) * msize - page_split". This would probe too little memory and could miss faults. This commit fixes these bugs by leveraging the probe_pages helper which automatically handles cross-page memory accesses correctly. Fixes: 17288e38bebf ("optimize the memory probing for vector fault-only-fir= st loads.") Signed-off-by: Max Chou Acked-by: Alistair Francis Message-ID: <20260318013805.1920377-3-max.chou@sifive.com> Signed-off-by: Alistair Francis --- target/riscv/vector_helper.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index e60248d6d3..83dd26314d 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -658,9 +658,9 @@ vext_ldff(void *vd, void *v0, target_ulong base, CPURIS= CVState *env, uint32_t esz =3D 1 << log2_esz; uint32_t msize =3D nf * esz; uint32_t vma =3D vext_vma(desc); - target_ulong addr, addr_probe, addr_i, offset, remain, page_split, ele= ms; + target_ulong addr, addr_i, offset, remain, page_split, elems; int mmu_index =3D riscv_env_mmu_index(env, false); - int flags, probe_flags; + int flags; void *host; =20 VSTART_CHECK_EARLY_EXIT(env, env->vl); @@ -674,16 +674,8 @@ vext_ldff(void *vd, void *v0, target_ulong base, CPURI= SCVState *env, } =20 /* Check page permission/pmp/watchpoint/etc. */ - probe_pages(env, addr, elems * msize, ra, MMU_DATA_LOAD, mmu_index, &h= ost, - &flags, true); - - /* If we are crossing a page check also the second page. */ - if (env->vl > elems) { - addr_probe =3D addr + (elems << log2_esz); - probe_pages(env, addr_probe, elems * msize, ra, MMU_DATA_LOAD, - mmu_index, &host, &probe_flags, true); - flags |=3D probe_flags; - } + probe_pages(env, addr, (env->vl - env->vstart) * msize, ra, MMU_DATA_L= OAD, + mmu_index, &host, &flags, true); =20 if (flags & ~TLB_WATCHPOINT) { /* probe every access */ --=20 2.53.0 From nobody Sun Mar 22 14:13:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1773962865; cv=none; d=zohomail.com; s=zohoarc; b=JsR4n/hbCpqlsIlsEuf2y3d9pdVWZEuVf9osxoMOcvUvf+j0ziXgKWofcXx4xBusw2a39FExlCA/rG77JOxoj8nfFkz1Od617ftp1cnX7gmvZRqDidXsUmUOFHD3PDFXSyeRqqmgy+O/PP0L2LGMAmDd1qlJy0kkDHUth1RPekQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773962865; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=RYB7pnWPDF09kxM2pVeCxMznDuYzQx/e50Ubr54oZJY=; b=aBIsu89xDYEeDMlf3NHxTrv+bcFSBe0RM0ZKDTaEW445yKh27dgMKPTZB/WuLile/koV+NWGvAeeHCtBuo9kGnL8aPhPr2sGc9OfaMBq1Kd2UX0Vmk6yVRxTgJAEU3TiN950JoxJqyT2rd36vrpIm2llTu6vPr6WpFti6Hyy63w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773962865354270.73003574230734; Thu, 19 Mar 2026 16:27:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3MlV-00020j-9D; Thu, 19 Mar 2026 19:26:59 -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 1w3MlD-0001Rl-1O for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:39 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3MlB-0007jI-7q for qemu-devel@nongnu.org; Thu, 19 Mar 2026 19:26:38 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2adff872068so274745ad.1 for ; Thu, 19 Mar 2026 16:26:34 -0700 (PDT) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083516ae1sm2979165ad.13.2026.03.19.16.26.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 16:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773962793; x=1774567593; 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=RYB7pnWPDF09kxM2pVeCxMznDuYzQx/e50Ubr54oZJY=; b=XLpZJGAEdls4o7FiLQKpDqhaTrzTxJWVbLTmscYyW/Iv/dCCAN+hxa6IDk45lFVE0Z hCkhlXmvSympn1Z8M0g+d3zXMQDiq5v19OE5rChvvLRVt4sLr8hjBznqqM681tiR4imZ GXSe7/d1ilDKzLJ2R0RhDdT62QuVphMTPleSjmyiMVmwmOUMy57YXkOdwId94kVg7eU3 tTW+lwlb0vmkvhHzzF+NGXv2nUrN5gZ2waoWeyjqwvXUTDY0KSSv8EGlygG+nM8T3Qm3 k1VQFFW9j1evhV7MauUtGgQQVNE1CSr8bu1k6MOMVnZjrY8VcHtotxGpCanG8/VlCDVk +o+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773962793; x=1774567593; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=RYB7pnWPDF09kxM2pVeCxMznDuYzQx/e50Ubr54oZJY=; b=TehzG2OFDkbvI0qOSB3Vsab3v/dLdNQQVIHyVKZNrjr3Eb4VtsTtROVTweBVEm1/Er nmfSgRXq3MqTp7n/BpyXjjQ6AalnJ5yNOmQETfc+woXm42teM4wpq/i01rPso5LZUjWW QUHYhtxWyvVVO/i4VLFN8s+sFyJC5vuBmFTn2r6TPS+oS/FwR0+T1c9KutcznoUwDW5M bQax6GvTWtegkJlY9bntXrS/dRN22cTqjJojcOAddtC3JlgHbCCZHhMPvNz9hliA9I93 llW2NFnAdkJjNpMmDvcHh9L8VWO/gG6YLrLN/qDjHxleWe2Hr8TyYPwbX2VsCy4TNgfE s11g== X-Gm-Message-State: AOJu0YyDcdN1EOgAlWTWVNUNLvlSlHsEyFkCpohSl1ySXsedjlQwNUMN KW4ZQsl7hSCpl4z6LH/81Fa9UXshgWaau64Euvteyh8ThOL15I9tug1S3rOpEw== X-Gm-Gg: ATEYQzy1FQXCYMA9yPXYV1kWahD+0VTnlGm8Bzhu5hOo40VscNoGTJxI2vMjH6AsmOy JjNl3FQ4FwtVnq3INm5QKqVBZOrWDE5BLs+VYeAxB92Z7u6pnStkpr/8WaydqQC+ur0vuFNQOfQ 8dXkDvGOqEK9ZblIJ3TS4cc75NvuZJzhprptWFae3uuLpZ5hfNgDwSpCyVqWnXXYugtEgH8MTNJ gB8S7Z1JFVCsXv9itNWaL4VLk5BwCcGFnS/b0TNqFBD0jOC2Ubzg4MOsLu2gTXcLTKeY7rzfZ2M wFwORP+fXNdi6ut/udG05jRq1NK86rLc4B20JqG2SH/pUy9Tal8GaviXszoIUcl6pGXc8Bfkm04 JES4mul3J21iZnJmHx17zZ4wJdeoQ+aN5szvVwee44Q3ILtv7h+P5FJS+P1N+WuBi2hOqMpSA1C U5ipDT0XsmdUj+NeCB0ES1Eez/tP6ztWKJ0V9KtUGXgw== X-Received: by 2002:a17:902:dad1:b0:2ae:cb0e:fd5e with SMTP id d9443c01a7336-2b08275878cmr8524945ad.23.1773962793541; Thu, 19 Mar 2026 16:26:33 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Jim Shu , Max Chou , Alistair Francis Subject: [PULL 17/17] target/riscv: Fix scountovf CSR behavior in VS-mode and M-mode Date: Fri, 20 Mar 2026 09:25:22 +1000 Message-ID: <20260319232522.1867400-18-alistair.francis@wdc.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260319232522.1867400-1-alistair.francis@wdc.com> References: <20260319232522.1867400-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=alistair23@gmail.com; helo=mail-pl1-x62f.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1773962866460154100 Content-Type: text/plain; charset="utf-8" From: Jim Shu From Sscofpmf spec [1]: - In M-mode, scountovf bit X is always readable. - in VS mode, scountovf bit X is readable when mcounteren bit X and hcounteren bit X are both set, and otherwise reads as zero. [1] https://github.com/riscv/riscv-isa-manual/blob/main/src/sscofpmf.adoc Signed-off-by: Jim Shu Signed-off-by: Max Chou Reviewed-by: Alistair Francis Message-ID: <20260318024234.2772480-1-jim.shu@sifive.com> Signed-off-by: Alistair Francis --- target/riscv/csr.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 5064483917..a75281539b 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -1599,6 +1599,7 @@ static RISCVException read_scountovf(CPURISCVState *e= nv, int csrno, int mhpmevt_start =3D CSR_MHPMEVENT3 - CSR_MCOUNTINHIBIT; int i; *val =3D 0; + bool virt =3D env->virt_enabled; =20 /* Virtualize scountovf for counter delegation */ if (riscv_cpu_cfg(env)->ext_sscofpmf && @@ -1609,8 +1610,19 @@ static RISCVException read_scountovf(CPURISCVState *= env, int csrno, } =20 for (i =3D mhpmevt_start; i < RV_MAX_MHPMEVENTS; i++) { - if ((get_field(env->mcounteren, BIT(i))) && - (env->mhpmevent_val[i] & MHPMEVENT_BIT_OF)) { + if (env->priv < PRV_M) { + if (!get_field(env->mcounteren, BIT(i))) { + /* no mcounteren in S/HS-mode */ + continue; + } + + if (virt && !get_field(env->hcounteren, BIT(i))) { + /* no hcounteren in VS-mode */ + continue; + } + } + + if (env->mhpmevent_val[i] & MHPMEVENT_BIT_OF) { *val |=3D BIT(i); } } --=20 2.53.0