]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: x86/mmu: Pass const memslot to rmap_add()
authorDavid Matlack <dmatlack@google.com>
Wed, 22 Jun 2022 19:27:01 +0000 (15:27 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Jun 2022 08:51:57 +0000 (04:51 -0400)
Constify rmap_add()'s @slot parameter; it is simply passed on to
gfn_to_rmap(), which takes a const memslot.

No functional change intended.

Reviewed-by: Ben Gardon <bgardon@google.com>
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20220516232138.1783324-15-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c

index a7748c5a238551f33443994e7241f45c7bae968c..45a4e85c0b2c18823d854721e2e3d4c2b869b95e 100644 (file)
@@ -1556,7 +1556,7 @@ static bool kvm_test_age_rmapp(struct kvm *kvm, struct kvm_rmap_head *rmap_head,
 
 #define RMAP_RECYCLE_THRESHOLD 1000
 
-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;