[PATCH v5 13/21] KVM: x86/mmu: Pass const memslot to rmap_add()

David Matlack dmatlack at google.com
Fri May 13 13:28:11 PDT 2022

rmap_add() only uses the slot to call gfn_to_rmap() which takes a const

No functional change intended.

Reviewed-by: Ben Gardon <bgardon at google.com>
Signed-off-by: David Matlack <dmatlack at google.com>
 arch/x86/kvm/mmu/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index bc66029d837f..8a6dec1c27c8 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -1582,7 +1582,7 @@ static bool kvm_test_age_rmapp(struct kvm *kvm, struct kvm_rmap_head *rmap_head,
-static void rmap_add(struct kvm_vcpu *vcpu, struct kvm_memory_slot *slot,
+static void rmap_add(struct kvm_vcpu *vcpu, const struct kvm_memory_slot *slot,
 		     u64 *spte, gfn_t gfn)
 	struct kvm_mmu_page *sp;

More information about the kvm-riscv mailing list