aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/kvm-s390.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
-rw-r--r--arch/s390/kvm/kvm-s390.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 3fa0a10e4668..c8002193d9d4 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -690,14 +690,12 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
690} 690}
691 691
692/* Section: memory related */ 692/* Section: memory related */
693int kvm_arch_set_memory_region(struct kvm *kvm, 693int kvm_arch_prepare_memory_region(struct kvm *kvm,
694 struct kvm_userspace_memory_region *mem, 694 struct kvm_memory_slot *memslot,
695 struct kvm_memory_slot old, 695 struct kvm_memory_slot old,
696 int user_alloc) 696 struct kvm_userspace_memory_region *mem,
697 int user_alloc)
697{ 698{
698 int i;
699 struct kvm_vcpu *vcpu;
700
701 /* A few sanity checks. We can have exactly one memory slot which has 699 /* A few sanity checks. We can have exactly one memory slot which has
702 to start at guest virtual zero and which has to be located at a 700 to start at guest virtual zero and which has to be located at a
703 page boundary in userland and which has to end at a page boundary. 701 page boundary in userland and which has to end at a page boundary.
@@ -720,14 +718,23 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
720 if (!user_alloc) 718 if (!user_alloc)
721 return -EINVAL; 719 return -EINVAL;
722 720
721 return 0;
722}
723
724void kvm_arch_commit_memory_region(struct kvm *kvm,
725 struct kvm_userspace_memory_region *mem,
726 struct kvm_memory_slot old,
727 int user_alloc)
728{
729 int i;
730 struct kvm_vcpu *vcpu;
731
723 /* request update of sie control block for all available vcpus */ 732 /* request update of sie control block for all available vcpus */
724 kvm_for_each_vcpu(i, vcpu, kvm) { 733 kvm_for_each_vcpu(i, vcpu, kvm) {
725 if (test_and_set_bit(KVM_REQ_MMU_RELOAD, &vcpu->requests)) 734 if (test_and_set_bit(KVM_REQ_MMU_RELOAD, &vcpu->requests))
726 continue; 735 continue;
727 kvm_s390_inject_sigp_stop(vcpu, ACTION_RELOADVCPU_ON_STOP); 736 kvm_s390_inject_sigp_stop(vcpu, ACTION_RELOADVCPU_ON_STOP);
728 } 737 }
729
730 return 0;
731} 738}
732 739
733void kvm_arch_flush_shadow(struct kvm *kvm) 740void kvm_arch_flush_shadow(struct kvm *kvm)