KVM: MMU: propagate alloc_workqueue failure
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Mar 2022 16:42:52 +0000 (12:42 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 2 Apr 2022 09:34:38 +0000 (05:34 -0400)
commita1a39128faabc9883a7f9e3f8777b3fbd560fa5f
tree78a135733742d3f12bd3b2927b25d52683adcda0
parentb1e34d325397a33d97d845e312d7cf2a8b646b44
KVM: MMU: propagate alloc_workqueue failure

If kvm->arch.tdp_mmu_zap_wq cannot be created, the failure has
to be propagated up to kvm_mmu_init_vm and kvm_arch_init_vm.
kvm_arch_init_vm also has to undo all the initialization, so
group all the MMU initialization code at the beginning and
handle cleaning up of kvm_page_track_init.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/tdp_mmu.c
arch/x86/kvm/mmu/tdp_mmu.h
arch/x86/kvm/x86.c