]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: Stop passing kvm_userspace_memory_region to arch memslot hooks
authorSean Christopherson <seanjc@google.com>
Mon, 6 Dec 2021 19:54:18 +0000 (20:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Dec 2021 09:24:25 +0000 (04:24 -0500)
Drop the @mem param from kvm_arch_{prepare,commit}_memory_region() now
that its use has been removed in all architectures.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-Id: <aa5ed3e62c27e881d0d8bc0acbc1572bc336dc19.1638817640.git.maciej.szmigiero@oracle.com>

arch/arm64/kvm/mmu.c
arch/mips/kvm/mips.c
arch/powerpc/kvm/powerpc.c
arch/riscv/kvm/mmu.c
arch/s390/kvm/kvm-s390.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c

index dd95350ea15def7277c87f0f07c5675150c9d139..9b2d881ccf49bdac9826e27b066e26f63e9a985d 100644 (file)
@@ -1463,7 +1463,6 @@ out:
 }
 
 void kvm_arch_commit_memory_region(struct kvm *kvm,
-                                  const struct kvm_userspace_memory_region *mem,
                                   struct kvm_memory_slot *old,
                                   const struct kvm_memory_slot *new,
                                   enum kvm_mr_change change)
@@ -1486,7 +1485,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
 }
 
 int kvm_arch_prepare_memory_region(struct kvm *kvm,
-                                  const struct kvm_userspace_memory_region *mem,
                                   const struct kvm_memory_slot *old,
                                   struct kvm_memory_slot *new,
                                   enum kvm_mr_change change)
index bda717301db85d047f40efbfefcbd56cf6cfd257..e59cb6246f76314031dff911a0ff8714b7326177 100644 (file)
@@ -214,7 +214,6 @@ void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
 }
 
 int kvm_arch_prepare_memory_region(struct kvm *kvm,
-                                  const struct kvm_userspace_memory_region *mem,
                                   const struct kvm_memory_slot *old,
                                   struct kvm_memory_slot *new,
                                   enum kvm_mr_change change)
@@ -223,7 +222,6 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
 }
 
 void kvm_arch_commit_memory_region(struct kvm *kvm,
-                                  const struct kvm_userspace_memory_region *mem,
                                   struct kvm_memory_slot *old,
                                   const struct kvm_memory_slot *new,
                                   enum kvm_mr_change change)
index 575140ecb23c82b64fe1d113c5e7ab07f596bc9c..f1233500f4dcf018e841c9fcf654c2c33bca88b9 100644 (file)
@@ -698,7 +698,6 @@ void kvm_arch_free_memslot(struct kvm *kvm, struct kvm_memory_slot *slot)
 }
 
 int kvm_arch_prepare_memory_region(struct kvm *kvm,
-                                  const struct kvm_userspace_memory_region *mem,
                                   const struct kvm_memory_slot *old,
                                   struct kvm_memory_slot *new,
                                   enum kvm_mr_change change)
@@ -707,7 +706,6 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
 }
 
 void kvm_arch_commit_memory_region(struct kvm *kvm,
-                                  const struct kvm_userspace_memory_region *mem,
                                   struct kvm_memory_slot *old,
                                   const struct kvm_memory_slot *new,
                                   enum kvm_mr_change change)
index 573ade13820462892c339caf109532b354fbc9cc..7d884b15cf5ef1d488d0dfe7685800d73620026f 100644 (file)
@@ -462,7 +462,6 @@ void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
 }
 
 void kvm_arch_commit_memory_region(struct kvm *kvm,
-                               const struct kvm_userspace_memory_region *mem,
                                struct kvm_memory_slot *old,
                                const struct kvm_memory_slot *new,
                                enum kvm_mr_change change)
@@ -477,7 +476,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
 }
 
 int kvm_arch_prepare_memory_region(struct kvm *kvm,
-                               const struct kvm_userspace_memory_region *mem,
                                const struct kvm_memory_slot *old,
                                struct kvm_memory_slot *new,
                                enum kvm_mr_change change)
index 959a568a97bebc13a0516470cb66fba38da4904d..5dddd7817905a1f2a2d1f0fb668102d7d2e60884 100644 (file)
@@ -5007,7 +5007,6 @@ vm_fault_t kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf)
 
 /* Section: memory related */
 int kvm_arch_prepare_memory_region(struct kvm *kvm,
-                                  const struct kvm_userspace_memory_region *mem,
                                   const struct kvm_memory_slot *old,
                                   struct kvm_memory_slot *new,
                                   enum kvm_mr_change change)
@@ -5035,7 +5034,6 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
 }
 
 void kvm_arch_commit_memory_region(struct kvm *kvm,
-                               const struct kvm_userspace_memory_region *mem,
                                struct kvm_memory_slot *old,
                                const struct kvm_memory_slot *new,
                                enum kvm_mr_change change)
index 2a7567adb79995b6e64b6c88f63f1d650575fee3..f862c514c2c0d7a02a9b4f2be0cd73ca6bb6b368 100644 (file)
@@ -11674,7 +11674,6 @@ void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen)
 }
 
 int kvm_arch_prepare_memory_region(struct kvm *kvm,
-                                  const struct kvm_userspace_memory_region *mem,
                                   const struct kvm_memory_slot *old,
                                   struct kvm_memory_slot *new,
                                   enum kvm_mr_change change)
@@ -11778,7 +11777,6 @@ static void kvm_mmu_slot_apply_flags(struct kvm *kvm,
 }
 
 void kvm_arch_commit_memory_region(struct kvm *kvm,
-                               const struct kvm_userspace_memory_region *mem,
                                struct kvm_memory_slot *old,
                                const struct kvm_memory_slot *new,
                                enum kvm_mr_change change)
index cb7311dc6f32ff28020d8f061fca85c2ed00c9e9..da0d4f21a150a72ed762503b2a86811a00aa283b 100644 (file)
@@ -833,12 +833,10 @@ int __kvm_set_memory_region(struct kvm *kvm,
 void kvm_arch_free_memslot(struct kvm *kvm, struct kvm_memory_slot *slot);
 void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen);
 int kvm_arch_prepare_memory_region(struct kvm *kvm,
-                               const struct kvm_userspace_memory_region *mem,
                                const struct kvm_memory_slot *old,
                                struct kvm_memory_slot *new,
                                enum kvm_mr_change change);
 void kvm_arch_commit_memory_region(struct kvm *kvm,
-                               const struct kvm_userspace_memory_region *mem,
                                struct kvm_memory_slot *old,
                                const struct kvm_memory_slot *new,
                                enum kvm_mr_change change);
index 46060cc542ef4788aa1280a469ad544138efd5ec..373079a03710af99e0af9a42d5b152059c81ea22 100644 (file)
@@ -1550,7 +1550,6 @@ static void kvm_copy_memslots_arch(struct kvm_memslots *to,
 }
 
 static int kvm_set_memslot(struct kvm *kvm,
-                          const struct kvm_userspace_memory_region *mem,
                           struct kvm_memory_slot *new,
                           enum kvm_mr_change change)
 {
@@ -1636,7 +1635,7 @@ static int kvm_set_memslot(struct kvm *kvm,
                old.as_id = new->as_id;
        }
 
-       r = kvm_arch_prepare_memory_region(kvm, mem, &old, new, change);
+       r = kvm_arch_prepare_memory_region(kvm, &old, new, change);
        if (r)
                goto out_slots;
 
@@ -1652,7 +1651,7 @@ static int kvm_set_memslot(struct kvm *kvm,
        else if (change == KVM_MR_CREATE)
                kvm->nr_memslot_pages += new->npages;
 
-       kvm_arch_commit_memory_region(kvm, mem, &old, new, change);
+       kvm_arch_commit_memory_region(kvm, &old, new, change);
 
        /* Free the old memslot's metadata.  Note, this is the full copy!!! */
        if (change == KVM_MR_DELETE)
@@ -1737,7 +1736,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
                new.id = id;
                new.as_id = as_id;
 
-               return kvm_set_memslot(kvm, mem, &new, KVM_MR_DELETE);
+               return kvm_set_memslot(kvm, &new, KVM_MR_DELETE);
        }
 
        new.as_id = as_id;
@@ -1800,7 +1799,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
                        bitmap_set(new.dirty_bitmap, 0, new.npages);
        }
 
-       r = kvm_set_memslot(kvm, mem, &new, change);
+       r = kvm_set_memslot(kvm, &new, change);
        if (r)
                goto out_bitmap;