From: Greg Kroah-Hartman Date: Mon, 7 Mar 2022 09:01:10 +0000 (+0100) Subject: 5.16-stable patches X-Git-Tag: v4.9.305~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8183afaf9c99da6b5c21a04c548e319c90434b2;p=thirdparty%2Fkernel%2Fstable-queue.git 5.16-stable patches added patches: kvm-x86-mmu-passing-up-the-error-state-of-mmu_alloc_shadow_roots.patch --- diff --git a/queue-5.16/kvm-x86-mmu-passing-up-the-error-state-of-mmu_alloc_shadow_roots.patch b/queue-5.16/kvm-x86-mmu-passing-up-the-error-state-of-mmu_alloc_shadow_roots.patch new file mode 100644 index 00000000000..5a82be90c1a --- /dev/null +++ b/queue-5.16/kvm-x86-mmu-passing-up-the-error-state-of-mmu_alloc_shadow_roots.patch @@ -0,0 +1,34 @@ +From c6c937d673aaa1d603f62f134e1ca9c173eeeed3 Mon Sep 17 00:00:00 2001 +From: Like Xu +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 + +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 +Reviewed-by: Sean Christopherson +Message-Id: <20220301124941.48412-1-likexu@tencent.com> +Signed-off-by: Paolo Bonzini +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -3573,7 +3573,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) diff --git a/queue-5.16/series b/queue-5.16/series index d929147d0ef..c572b79af51 100644 --- a/queue-5.16/series +++ b/queue-5.16/series @@ -183,3 +183,4 @@ proc-fix-documentation-and-description-of-pagemap.patch x86-kvmclock-fix-hyper-v-isolated-vm-s-boot-issue-when-vcpus-64.patch s390-ftrace-fix-arch_ftrace_get_regs-implementation.patch s390-ftrace-fix-ftrace_caller-ftrace_regs_caller-generation.patch +kvm-x86-mmu-passing-up-the-error-state-of-mmu_alloc_shadow_roots.patch