]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Unconditionally set IL for injected undefined exceptions
authorFuad Tabba <tabba@google.com>
Thu, 18 Jun 2026 12:16:38 +0000 (13:16 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 22 Jun 2026 09:44:08 +0000 (10:44 +0100)
commit1d695dc827957e9570d1b56abac1250d2d13bf0c
tree302747432002119b0d7b5f01b9c4acc058d534ac
parentdaa71eca24fdfb43029830bd57ddaddf70c59b23
KVM: arm64: Unconditionally set IL for injected undefined exceptions

inject_undef64() derives IL from the triggering trap's instruction
length (kvm_vcpu_trap_il_is32bit()), but the IL of the injected
exception is fixed by its EC, not by the triggering instruction. The
architecture mandates IL=1 for EC=0 (Unknown) unconditionally, so the
conditional is wrong. The undef-injection paths are not reached from
16-bit instructions, so there is no functional change today, but the
logic should not rely on that.

Set ESR_ELx_IL unconditionally.

Fixes: aa8eff9bfbd5 ("arm64: KVM: fault injection into a guest")
Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20260618121643.4105064-3-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/inject_fault.c