summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-12-06 20:54:18 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2021-12-08 04:24:25 -0500
commit6a99c6e3f52a6f0d4c6ebcfa7359c718a19ffbe6 (patch)
treec44811a25479ef321af462a22ab4a92938f28448 /virt
parentd01495d4cffb327200d4522db6eb3fabfdc9e2f5 (diff)
KVM: Stop passing kvm_userspace_memory_region to arch memslot hooks
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>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 46060cc542ef..373079a03710 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -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;