From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28C9D39AD34 for ; Tue, 12 May 2026 14:26:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778595976; cv=none; b=cY8KrXmNojWLO82azZAIYXvpT3hrnTFf1aWIVd7JUMson6OrAG28llbQ/QfY4kO9DfAzUd4QPXOFLwQMCpItO/3vTFU111uVUxi+tYP1vdbpLSYWwDw79oUVUg3Ll3tMvjjYn+sOipVFgxxaELKH9Ov/K3lvvCpjtEHugfDRmtY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778595976; c=relaxed/simple; bh=+iqWmgRNxHCeKBIiNg9xQrX9sT4DOHD3JVegsr5bPE4=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=sAX0ee+Hr4IC4UQ1R/sbmtixV1/7AeLD4MrSsfeZIk/zS/gIkXpqsy/QsLFcLqUA9QnPisq4beac3RNJKGY3BKITjuZdp9eDcJtFUCiX7Mie1+puhoa76IoMej6e8G+oi7JRVKEIn1+XeJp07Lf2CohSQLuVWeX2HSqOuaOzFzg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=v9YB3v3P; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="v9YB3v3P" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0C1EC2BCB0; Tue, 12 May 2026 14:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778595976; bh=+iqWmgRNxHCeKBIiNg9xQrX9sT4DOHD3JVegsr5bPE4=; h=Subject:To:Cc:From:Date:From; b=v9YB3v3PQZGkBwZ/8rWTFUv3H2wiq6q/g7/3ScGOyVbkwjZxvTjNl7Yf6zfAi2gzJ kLNtK09pvGCcsVK/7NamSNnOTYy5JSE/oSOzQ6XJ51ntRvQ0DNVLRIhi4yuE7WSigs TpMHXpA/pxyAxx4gql3OeYKHD8C9MNcis7VPQ13M= Subject: FAILED: patch "[PATCH] LoongArch: KVM: Move AVEC interrupt injection into switch" failed to apply to 6.1-stable tree To: maobibo@loongson.cn,chenhuacai@loongson.cn Cc: From: Date: Tue, 12 May 2026 16:26:08 +0200 Message-ID: <2026051208-outsell-ribcage-1842@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 6debfff78584f0adedf7355fe5263198a3fc6b19 # git commit -s git send-email --to '' --in-reply-to '2026051208-outsell-ribcage-1842@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 6debfff78584f0adedf7355fe5263198a3fc6b19 Mon Sep 17 00:00:00 2001 From: Bibo Mao Date: Mon, 4 May 2026 09:00:48 +0800 Subject: [PATCH] LoongArch: KVM: Move AVEC interrupt injection into switch loop When AVEC interrupt controller is emulated in user space, AVEC interrupt is injected by software like SIP0/SIP1/TI/IPI interrupts. Here also move the AVEC interrupt injection in switch loop. Cc: stable@vger.kernel.org Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen diff --git a/arch/loongarch/kvm/interrupt.c b/arch/loongarch/kvm/interrupt.c index 32930959f7c2..53dac8ab8fb1 100644 --- a/arch/loongarch/kvm/interrupt.c +++ b/arch/loongarch/kvm/interrupt.c @@ -33,13 +33,12 @@ static int kvm_irq_deliver(struct kvm_vcpu *vcpu, unsigned int priority) if (priority < EXCCODE_INT_NUM) irq = priority_to_irq[priority]; - if (kvm_guest_has_msgint(&vcpu->arch) && (priority == INT_AVEC)) { - dmsintc_inject_irq(vcpu); - set_gcsr_estat(irq); - return 1; - } - switch (priority) { + case INT_AVEC: + if (!kvm_guest_has_msgint(&vcpu->arch)) + break; + dmsintc_inject_irq(vcpu); + fallthrough; case INT_TI: case INT_IPI: case INT_SWI0: @@ -66,12 +65,11 @@ static int kvm_irq_clear(struct kvm_vcpu *vcpu, unsigned int priority) if (priority < EXCCODE_INT_NUM) irq = priority_to_irq[priority]; - if (kvm_guest_has_msgint(&vcpu->arch) && (priority == INT_AVEC)) { - clear_gcsr_estat(irq); - return 1; - } - switch (priority) { + case INT_AVEC: + if (!kvm_guest_has_msgint(&vcpu->arch)) + break; + fallthrough; case INT_TI: case INT_IPI: case INT_SWI0: