]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Extract zapping of rmaps for gfn range to separate helper
authorSean Christopherson <seanjc@google.com>
Fri, 22 Oct 2021 01:00:05 +0000 (18:00 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Oct 2021 09:51:52 +0000 (05:51 -0400)
commit6988cad0b604ccef8913cf7ba5e0f1d96e8efc50
tree0abc0d65d329353c9a37fc0320266408c4fbea12
parent2aba7f273d7d4ea73009ee8b4648ae7b91a1ddeb
KVM: x86/mmu: Extract zapping of rmaps for gfn range to separate helper

Extract the zapping of rmaps, a.k.a. legacy MMU, for a gfn range to a
separate helper to clean up the unholy mess that kvm_zap_gfn_range() has
become.  In addition to deep nesting, the rmaps zapping spreads out the
declaration of several variables and is generally a mess.  Clean up the
mess now so that future work to improve the memslots implementation
doesn't need to deal with it.

Cc: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211022010005.1454978-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c