Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: KVM: Delegate illegal instruction fault
@ 2025-06-20  9:17 Xu Lu
  2025-06-20 12:04 ` Radim Krčmář
  0 siblings, 1 reply; 13+ messages in thread
From: Xu Lu @ 2025-06-20  9:17 UTC (permalink / raw)
  To: anup, atish.patra, paul.walmsley, palmer, aou, alex
  Cc: kvm, kvm-riscv, linux-riscv, linux-kernel, Xu Lu

Delegate illegal instruction fault to VS mode in default to avoid such
exceptions being trapped to HS and redirected back to VS.

Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
---
 arch/riscv/include/asm/kvm_host.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/kvm_host.h b/arch/riscv/include/asm/kvm_host.h
index 85cfebc32e4cf..97cc2c0dba73a 100644
--- a/arch/riscv/include/asm/kvm_host.h
+++ b/arch/riscv/include/asm/kvm_host.h
@@ -48,6 +48,7 @@
 					 BIT(EXC_SYSCALL)         | \
 					 BIT(EXC_INST_PAGE_FAULT) | \
 					 BIT(EXC_LOAD_PAGE_FAULT) | \
+					 BIT(EXC_INST_ILLEGAL)    | \
 					 BIT(EXC_STORE_PAGE_FAULT))
 
 #define KVM_HIDELEG_DEFAULT		(BIT(IRQ_VS_SOFT)  | \
-- 
2.20.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-06-23 17:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-20  9:17 [PATCH] RISC-V: KVM: Delegate illegal instruction fault Xu Lu
2025-06-20 12:04 ` Radim Krčmář
2025-06-22 10:11   ` [External] " Xu Lu
2025-06-23 10:04     ` Radim Krčmář
2025-06-23 10:29       ` Xu Lu
2025-06-23  8:04   ` Clément Léger
2025-06-23  9:54     ` Radim Krčmář
2025-06-23 12:12     ` [External] " Xu Lu
2025-06-23 12:35       ` Clément Léger
2025-06-23 13:30         ` Xu Lu
2025-06-23 13:42           ` Clément Léger
2025-06-23 14:09             ` Xu Lu
2025-06-23 14:11               ` Clément Léger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox