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 B70342222C0; Thu, 13 Feb 2025 14:38:05 +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=1739457485; cv=none; b=qowmDoHGwIP4moVOkCCBofhct8Q/iconqXNc71RPKc4G4hc9VuziGAg9oXiuJ6Vep+7MwDPQZwjcixjwA6O+2Ob0lYI7Y+viA1c5XWPdEft/rMGSf8Kq8avzVDnsWNWxEDXYDSjHCY/Nkr8Z2xBK0FjAVJzKupggOUEaCPDRgis= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739457485; c=relaxed/simple; bh=xSfrKt/2pDCCTTQ/sJZetZNo3BEtLxEKzaFuPS7qmbE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cxDeYGrpzi4o8reunjCT9WI8S5MJb+WVKEgsqA/60Wiji98E5iA3arF9tMVUoxjgqFWPOBWNRjsQHiSVVeHGrpjwUZCvmcmnhrZiLalAsXsP0vr7TthrsSPWoFTZ+LDr2RB20Qfp/mDaB7rOjabR/MOO9aC+RGbaszRHa+GhswA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=i1ofWk9H; 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="i1ofWk9H" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CA7CC4CED1; Thu, 13 Feb 2025 14:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739457485; bh=xSfrKt/2pDCCTTQ/sJZetZNo3BEtLxEKzaFuPS7qmbE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i1ofWk9HDiUGFECQ/HtuxLNCC5K7XCtRH7R+oBL9JBM0wVS2WbvjjJLYlqRoUIETP 9c8RMxnG/UholmnVy4hl6Mcy57GzpGMLEu0TfMVMWL4opPcFqaJwAInHM6wtgkz4Fc 02lGJUvai8sNLNXlY7/pM40YPhm3RvesOys5WMC0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sean Christopherson , Paolo Bonzini , Sasha Levin Subject: [PATCH 6.12 092/422] KVM: e500: always restore irqs Date: Thu, 13 Feb 2025 15:24:01 +0100 Message-ID: <20250213142440.102868790@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250213142436.408121546@linuxfoundation.org> References: <20250213142436.408121546@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Paolo Bonzini [ 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 Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin --- 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 e5a145b578a47..6824e8139801c 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm/e500_mmu_host.c @@ -479,7 +479,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", @@ -488,8 +487,9 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, goto out; } } - writable = kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg); + local_irq_restore(flags); + writable = kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg); kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize, ref, gvaddr, stlbe); -- 2.39.5