Re: [PATCH 7/7] KVM: x86/MMU: Move rmap_add() to rmap.c
From: David Matlack
Date: Fri Dec 09 2022 - 18:27:47 EST
On Tue, Dec 06, 2022 at 05:36:01PM +0000, Ben Gardon wrote:
> Move rmap_add() to rmap.c to complete the migration of the various rmap
> operations out of mmu.c.
IMO rmap_{can_add,add,remove}() should stay in mmu.c since the
implementation of those functions is all Shadow MMU book-keeping that
just needs to be done when the rmap changes.
I would be in favor of giving them more accurate and MMU-related names
though. e.g.
rmap_can_add() -> kvm_vcpu_can_extend_rmap()
rmap_add() -> kvm_mmu_rmap_add()
rmap_remove() -> kvm_mmu_rmap_remove()