KVM: cleanup allocation of rmaps and page tracking data
Unify the flags for rmaps and page tracking data, using a single flag in struct kvm_arch and a single loop to go over all the address spaces and memslots. This avoids code duplication between alloc_all_memslots_rmaps and kvm_page_track_enable_mmu_write_tracking. Signed-off-by:David Stevens <stevensd@chromium.org> [This patch is the delta between David's v2 and v3, with conflicts fixed and my own commit message. - Paolo] Co-developed-by:
Sean Christopherson <seanjc@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- arch/x86/include/asm/kvm_host.h 5 additions, 12 deletionsarch/x86/include/asm/kvm_host.h
- arch/x86/include/asm/kvm_page_track.h 2 additions, 1 deletionarch/x86/include/asm/kvm_page_track.h
- arch/x86/kvm/mmu.h 17 additions, 5 deletionsarch/x86/kvm/mmu.h
- arch/x86/kvm/mmu/mmu.c 63 additions, 15 deletionsarch/x86/kvm/mmu/mmu.c
- arch/x86/kvm/mmu/page_track.c 15 additions, 42 deletionsarch/x86/kvm/mmu/page_track.c
- arch/x86/kvm/mmu/tdp_mmu.h 0 additions, 2 deletionsarch/x86/kvm/mmu/tdp_mmu.h
- arch/x86/kvm/x86.c 1 addition, 46 deletionsarch/x86/kvm/x86.c
Please register or sign in to comment