mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
873c3db6d2
commit
d0f94a0d40
1 file changed
+4
-1
@@ -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,10 +205,12 @@ void do_trap(struct cpu_user_regs *cpu_regs)
|
||||
break;
|
||||
|
||||
default:
|
||||
intr_handled = false;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
if ( intr_handled )
|
||||
break;
|
||||
}
|
||||
|
||||
do_unexpected_trap(cpu_regs);
|
||||
|
||||