From nobody Mon Feb 9 07:32:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1769697684; cv=none; d=zohomail.com; s=zohoarc; b=IEzQVc9bDbRXruAPFn38eu9j3yuSC5T3pXma74zfzbgoF3xI1J2Jvk+iBbDu6QBv6gA8O1Q6xsa1dUzcwlQHdF4AMRCYm4yUC87SY2RMyB5mw2GAmK34CiG0AvDFcC0GrKuXs4O/sCVey/afyxy8UgjFZfpFb85DbmbfEw9Z3M8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769697684; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9It+LgUBP+HQMboZ37j1eEcPa8t6CGcqjlQAntYPfIo=; b=EoSNvNGEu6fRV5Pl1fL3tyqtESkczx3Q1EY+R5Qc77XW59WW9WNLbsUrAFAwzNC7kklol2AZRU3qUglFBaY5nTDA6rOR4aUqk7iS7q8V08jlp0ibFDweCAfGqIA4jNqxBUVIP+bPUSajS0qW2Zu5sWb69wozWmcv0rvkzg2IZM4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1769697684780809.9733161312167; Thu, 29 Jan 2026 06:41:24 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1216664.1526598 (Exim 4.92) (envelope-from ) id 1vlTCj-0001AB-Mb; Thu, 29 Jan 2026 14:41:05 +0000 Received: by outflank-mailman (output) from mailman id 1216664.1526598; Thu, 29 Jan 2026 14:41:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vlTCj-0001A4-JZ; Thu, 29 Jan 2026 14:41:05 +0000 Received: by outflank-mailman (input) for mailman id 1216664; Thu, 29 Jan 2026 14:41:03 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vlTCh-00019y-RN for xen-devel@lists.xenproject.org; Thu, 29 Jan 2026 14:41:03 +0000 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [2a00:1450:4864:20::32a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 884cf30d-fd20-11f0-9ccf-f158ae23cfc8; Thu, 29 Jan 2026 15:41:01 +0100 (CET) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4801bc32725so8064525e9.0 for ; Thu, 29 Jan 2026 06:41:01 -0800 (PST) Received: from fedora (user-109-243-67-101.play-internet.pl. [109.243.67.101]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4806ce564f9sm142288155e9.14.2026.01.29.06.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 06:41:00 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 884cf30d-fd20-11f0-9ccf-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769697661; x=1770302461; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9It+LgUBP+HQMboZ37j1eEcPa8t6CGcqjlQAntYPfIo=; b=fdF7mkXd0S4UhaGoSeraMprWpYxmgb82OLqBdcDeV506EdqhXWQhzwc1PEYiqAFv9j yZrhq6eZmo5ustZAyqwxiBEDqJc/xGipNwJbhSu1JJuowkTBJVbwKvzKdh2x8de1taSq WY8vmMHpHXsGzC37dCNKxR5wWQZrwQkQBto+Hd06RP8hFxH2ZH5iDbI95UjEUW87/pp6 0YcI/ql8HZZp3qcWF1Gk2E942T7iD63IMrEPGdu7NG9dEM9bThnNswN2MNBqyQu9fKKj kVsxy63qBbVxbZnxAGQ6hDMdG4brvoIXNur+nwlCn0eYLUp9vh87Z5HCrn/AUlDsESYE P4qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769697661; x=1770302461; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9It+LgUBP+HQMboZ37j1eEcPa8t6CGcqjlQAntYPfIo=; b=GY1Hb5UNOZq72DYB3W5oG6+yY4btpHVxAgaURzlvfEhB2q/Fo/VUsoZZGpqt8d3qmf Fw5IyzJi2DNO0Yn9F/YcvLpSSAcg3VpQykGUFqgzf4ogsJiuCqqiA7h9NuQXTIjB64Vo nhzuVDiZqSV0tVoVoQbPemBUTzUpjNCeEPTqWma7sNZf0taNCQcN3aAlcYWqlbVS8dfv cy1wMgrFT33tb20OLsZ80EjMjN9z3kJe7gxnrH5XRmVe+rZQ/iAnlsgZxjbNYHdQ0Lso sOV/IoOkFgt46W6h3UVOhH46NgnB1CzXOyohpWsj4Nqyk3t57HRpMIoE03eJTXundsVP mgkw== X-Gm-Message-State: AOJu0YyrnDlRMGsGKi4tsjpIgz6DQw4xoEgsEE+IXHNdwJnB1mITMACG S4I3jhK2LswmPfXfK7IFYYx/5IZNHTmujkYLF5nLsYoVGldlnjODGjADuGEDcA== X-Gm-Gg: AZuq6aKAAmZBUOUPh/6odu6rl7kTd/12usV+G99hVkarlryanO2ejEWGbTOKGw1vYfv FbrNNtou5t5CFe+5zwfWstDL20/UFYmVDtUNSTolKxKjSvT+Ky+yYPKMwk2Xsltu0Gz8qsTKhYm cyTH1+f0ULbJjMdtuBGVLeQOWbcX5vX4cZYks0/fcHVEJQrDpXEDCkIX5yZ44kmcRvALLd+17jh N1341ARyrEWGbOT6dyKxmDOCYTV7v7l5bypCGmH0UJ9K5oF/ALO54j3h8wQ7ulRizEFAT2hIG+1 feRIQpwyC6K0ooZUGYxvvol84KuqogiTecxI0vh4HpddZcj610VCFBXnXbd7vYYrvX1wcp+rUkR eX/z+92df/CQorwdC5OnKGalJ2GgCzc5z18M25PQ8Gm3gyHnNvv0f2rwOu16iYV7PFkwfnjlnEv TPkISInRFMfeHawHeir290IM8A+v+6JW8bFEsRzGjTG0yyuiTz7fm0+Q== X-Received: by 2002:a05:600c:3b96:b0:475:dcbb:7903 with SMTP id 5b1f17b1804b1-48069c37e2dmr126208425e9.9.1769697660684; Thu, 29 Jan 2026 06:41:00 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Romain Caritey , Oleksii Kurochko , Alistair Francis , Connor Davis , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v1] xen/riscv: route unhandled interrupts to do_unexpected_trap() Date: Thu, 29 Jan 2026 15:40:52 +0100 Message-ID: X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1769697686086158500 Content-Type: text/plain; charset="utf-8" Currently, an interrupt cause which is not explicitly handled is silently ignored, and execution resumes without reporting the fault. This is incorrect and do_unexpected_trap() should be called in the case of unhandled interrupt. Fixes: a8b85fabf6090 ("xen/riscv: add external interrupt handling for hyper= visor mode") Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- xen/arch/riscv/traps.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/riscv/traps.c b/xen/arch/riscv/traps.c index 84b5ab4142f6..34920f4e5693 100644 --- a/xen/arch/riscv/traps.c +++ b/xen/arch/riscv/traps.c @@ -196,6 +196,7 @@ void do_trap(struct cpu_user_regs *cpu_regs) { /* Handle interrupt */ unsigned long icause =3D cause & ~CAUSE_IRQ_FLAG; + bool intr_handled =3D true; =20 switch ( icause ) { @@ -204,10 +205,12 @@ void do_trap(struct cpu_user_regs *cpu_regs) break; =20 default: + intr_handled =3D false; break; } =20 - break; + if ( intr_handled ) + break; } =20 do_unexpected_trap(cpu_regs); --=20 2.52.0