[ Upstream commit 87ecfdbc699cc95fac73291b52650283ddcf929d ]
If find_linux_pte fails, IRQs will not be restored. This is unlikely to happen in practice since it would have been reported as hanging hosts, but it should of course be fixed anyway.
Cc: stable@vger.kernel.org Reported-by: Sean Christopherson seanjc@google.com Signed-off-by: Paolo Bonzini pbonzini@redhat.com --- arch/powerpc/kvm/e500_mmu_host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index c664fdec75b1..3708fa48bee9 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm/e500_mmu_host.c @@ -481,7 +481,6 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, if (pte_present(pte)) { wimg = (pte_val(pte) >> PTE_WIMGE_SHIFT) & MAS2_WIMGE_MASK; - local_irq_restore(flags); } else { local_irq_restore(flags); pr_err_ratelimited("%s: pte not present: gfn %lx,pfn %lx\n", @@ -490,8 +489,9 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, goto out; } } + local_irq_restore(flags); + kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg); - kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize, ref, gvaddr, stlbe);
[ Sasha's backport helper bot ]
Hi,
Summary of potential issues: ❌ Build failures detected
The upstream commit SHA1 provided is correct: 87ecfdbc699cc95fac73291b52650283ddcf929d
Status in newer kernel trees: 6.13.y | Present (exact SHA1) 6.6.y | Present (different SHA1: b9d93eda1214)
Note: The patch differs from the upstream commit: --- Failed to apply patch cleanly. ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.12.y | Failed | N/A |
Build Errors: Patch failed to apply on stable/linux-6.12.y. Reject:
diff a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c (rejected hunks) @@ -481,7 +481,6 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, if (pte_present(pte)) { wimg = (pte_val(pte) >> PTE_WIMGE_SHIFT) & MAS2_WIMGE_MASK; - local_irq_restore(flags); } else { local_irq_restore(flags); pr_err_ratelimited("%s: pte not present: gfn %lx,pfn %lx\n", @@ -490,8 +489,9 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, goto out; } } + local_irq_restore(flags); + kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg); - kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize, ref, gvaddr, stlbe);
On Thu, Mar 6, 2025 at 8:11 PM Sasha Levin sashal@kernel.org wrote:
Build Errors: Patch failed to apply on stable/linux-6.12.y. Reject:
This patch applies on top of a version that actually compiles, i.e. it assumes that you've reverted all the broken stuff that got into 6.1/6.6/6.12:
6.12 48fe216d7db6b651972c1c1d8e3180cd699971b0 833f69be62ac366b5c23b4a6434389e470dd5c7f f2623aec7fdc2675667042c85f87502c9139c098 dec857329fb9a66a5bce4f9db14c97ef64725a32
6.6 15d60c13b704f770ba45c58477380d4577cebfa3 59e21c4613b0a46f46eb124984928df46d88ad57 ba3cf83f4a5063edb6ee150633e641954ce30478 b9d93eda1214985d1b3d00a0f9d4306282a5b189
6.1 bce6adebc9c5c4d49ea6b4fcaa56ec590b9516a6 deead14da7478b40a18cc439064c9c1a933e1b4b d2004572fc3014cae43a0d6374ffabbbab1644d4 8b92e9cc04e71afb2be09f78af1de5492a0af4a4
Paolo
linux-stable-mirror@lists.linaro.org