Re: [PATCH] RISC-V: KVM: Delegate illegal instruction fault

From: Radim Krčmář
Date: Mon Jun 23 2025 - 05:55:12 EST


2025-06-23T10:04:45+02:00, Clément Léger <cleger@xxxxxxxxxxxx>:
> On 20/06/2025 14:04, Radim Krčmář wrote:
>> And why not delegate the others as well?
>> (EXC_LOAD_MISALIGNED, EXC_STORE_MISALIGNED, EXC_LOAD_ACCESS,
>> EXC_STORE_ACCESS, and EXC_INST_ACCESS.)
>
> Currently, OpenSBI does not delegate misaligned exception by default and
> handles misaligned access by itself, this is (partially) why we added
> the FWFT SBI extension to request such delegation. Since some supervisor
> software expect that default, they do not have code to handle misaligned
> accesses emulation. So they should not be delegated by default.

Yeah, I forgot about your patches that conflict with the change, thanks.

(The current KVM exception handler only forwards all the listed
exceptions, so the only observable difference this change would make is
that the KVM SBI PMU event is not counted.)