aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r--drivers/kvm/kvm_main.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index ab2c77c9ece..5113cbf7567 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -643,10 +643,9 @@ EXPORT_SYMBOL_GPL(fx_init);
643 * 643 *
644 * Discontiguous memory is allowed, mostly for framebuffers. 644 * Discontiguous memory is allowed, mostly for framebuffers.
645 */ 645 */
646static int kvm_vm_ioctl_set_memory_region(struct kvm *kvm, 646int kvm_set_memory_region(struct kvm *kvm,
647 struct 647 struct kvm_userspace_memory_region *mem,
648 kvm_userspace_memory_region *mem, 648 int user_alloc)
649 int user_alloc)
650{ 649{
651 int r; 650 int r;
652 gfn_t base_gfn; 651 gfn_t base_gfn;
@@ -789,6 +788,16 @@ out_unlock:
789 kvm_free_physmem_slot(&new, &old); 788 kvm_free_physmem_slot(&new, &old);
790out: 789out:
791 return r; 790 return r;
791
792}
793EXPORT_SYMBOL_GPL(kvm_set_memory_region);
794
795static int kvm_vm_ioctl_set_memory_region(struct kvm *kvm,
796 struct
797 kvm_userspace_memory_region *mem,
798 int user_alloc)
799{
800 return kvm_set_memory_region(kvm, mem, user_alloc);
792} 801}
793 802
794static int kvm_vm_ioctl_set_nr_mmu_pages(struct kvm *kvm, 803static int kvm_vm_ioctl_set_nr_mmu_pages(struct kvm *kvm,