]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: arm64: Set IL for emulated SError injection
authorFuad Tabba <tabba@google.com>
Thu, 18 Jun 2026 12:16:41 +0000 (13:16 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 22 Jun 2026 09:44:08 +0000 (10:44 +0100)
kvm_inject_serror_esr() constructs an SError syndrome without IL. The
architecture mandates IL=1 for SError unconditionally.

Fixes: f6e2262dfa1a ("KVM: arm64: Populate ESR_ELx.EC for emulated SError injection")
Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20260618121643.4105064-6-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/inject_fault.c

index 444d219b02174e10690269b9626380e3625a3f92..d6c4fc16f87953e0b4cadbcb8d2551818e48c651 100644 (file)
@@ -381,7 +381,7 @@ int kvm_inject_serror_esr(struct kvm_vcpu *vcpu, u64 esr)
         */
        if (!serror_is_masked(vcpu)) {
                pend_serror_exception(vcpu);
-               esr |= FIELD_PREP(ESR_ELx_EC_MASK, ESR_ELx_EC_SERROR);
+               esr |= FIELD_PREP(ESR_ELx_EC_MASK, ESR_ELx_EC_SERROR) | ESR_ELx_IL;
                vcpu_write_sys_reg(vcpu, esr, exception_esr_elx(vcpu));
                return 1;
        }