]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Mar 2022 09:00:56 +0000 (10:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Mar 2022 09:00:56 +0000 (10:00 +0100)
added patches:
kvm-x86-mmu-passing-up-the-error-state-of-mmu_alloc_shadow_roots.patch

queue-5.15/kvm-x86-mmu-passing-up-the-error-state-of-mmu_alloc_shadow_roots.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/kvm-x86-mmu-passing-up-the-error-state-of-mmu_alloc_shadow_roots.patch b/queue-5.15/kvm-x86-mmu-passing-up-the-error-state-of-mmu_alloc_shadow_roots.patch
new file mode 100644 (file)
index 0000000..a825f96
--- /dev/null
@@ -0,0 +1,34 @@
+From c6c937d673aaa1d603f62f134e1ca9c173eeeed3 Mon Sep 17 00:00:00 2001
+From: Like Xu <likexu@tencent.com>
+Date: Tue, 1 Mar 2022 20:49:41 +0800
+Subject: KVM: x86/mmu: Passing up the error state of mmu_alloc_shadow_roots()
+
+From: Like Xu <likexu@tencent.com>
+
+commit c6c937d673aaa1d603f62f134e1ca9c173eeeed3 upstream.
+
+Just like on the optional mmu_alloc_direct_roots() path, once shadow
+path reaches "r = -EIO" somewhere, the caller needs to know the actual
+state in order to enter error handling and avoid something worse.
+
+Fixes: 4a38162ee9f1 ("KVM: MMU: load PDPTRs outside mmu_lock")
+Signed-off-by: Like Xu <likexu@tencent.com>
+Reviewed-by: Sean Christopherson <seanjc@google.com>
+Message-Id: <20220301124941.48412-1-likexu@tencent.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/kvm/mmu/mmu.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kvm/mmu/mmu.c
++++ b/arch/x86/kvm/mmu/mmu.c
+@@ -3579,7 +3579,7 @@ set_root_pgd:
+ out_unlock:
+       write_unlock(&vcpu->kvm->mmu_lock);
+-      return 0;
++      return r;
+ }
+ static int mmu_alloc_special_roots(struct kvm_vcpu *vcpu)
index e1e3a9c8b52f80cee683a5a379bb1b067ef677e9..4bf84a4e193b697b008d4f98b3f47a4984a37037 100644 (file)
@@ -259,3 +259,4 @@ btrfs-add-missing-run-of-delayed-items-after-unlink-during-log-replay.patch
 btrfs-do-not-start-relocation-until-in-progress-drops-are-done.patch
 revert-xfrm-xfrm_state_mtu-should-return-at-least-1280-for-ipv6.patch
 proc-fix-documentation-and-description-of-pagemap.patch
+kvm-x86-mmu-passing-up-the-error-state-of-mmu_alloc_shadow_roots.patch