OSDN Git Service

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)
commit21fa324654e4c733aa6538001194eac13d8bec07
tree0abc0d65d329353c9a37fc0320266408c4fbea12
parente8be2a5ba86c7d6553a22d76fd21ac2cf665b165
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