xen/riscv: route unhandled interrupts to do_unexpected_trap()

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: a8b85fabf6 ("xen/riscv: add external interrupt handling for hypervisor mode")
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Oleksii Kurochko authored and Jan Beulich committed 2026-02-02 10:20:54 +01:00
1 parent 873c3db6d2
commit d0f94a0d40
1 file changed
+3
+3
View File
@@ -196,6 +196,7 @@ void do_trap(struct cpu_user_regs *cpu_regs)
{
/* Handle interrupt */
unsigned long icause = cause & ~CAUSE_IRQ_FLAG;
bool intr_handled = true;
switch ( icause )
{
@@ -204,9 +205,11 @@ void do_trap(struct cpu_user_regs *cpu_regs)
break;
default:
intr_handled = false;
break;
}
if ( intr_handled )
break;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.