aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorNick Wang <jfwang@us.ibm.com>2013-03-25 12:22:57 -0400
committerGleb Natapov <gleb@redhat.com>2013-04-02 09:14:51 -0400
commitdd2887e7c36d0be986ef17a9dbec904e3e334566 (patch)
tree9efff383798f9b94967d322cbaacbe218f27da08 /arch/s390
parent3188bf6b809ba5e7df7b9f000634f08e8abbb76a (diff)
KVM: s390: Remove the sanity checks for kvm memory slot
To model the standby memory with memory_region_add_subregion and friends, the guest would have one or more regions of ram. Remove the check allowing only one memory slot and the check requiring the real address of memory slot starts at zero. Signed-off-by: Nick Wang <jfwang@us.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kvm/kvm-s390.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index d05a59c1eea7..b322ff15751d 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -977,18 +977,10 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
977 struct kvm_userspace_memory_region *mem, 977 struct kvm_userspace_memory_region *mem,
978 enum kvm_mr_change change) 978 enum kvm_mr_change change)
979{ 979{
980 /* A few sanity checks. We can have exactly one memory slot which has 980 /* A few sanity checks. We can have memory slots which have to be
981 to start at guest virtual zero and which has to be located at a 981 located/ended at a segment boundary (1MB). The memory in userland is
982 page boundary in userland and which has to end at a page boundary. 982 ok to be fragmented into various different vmas. It is okay to mmap()
983 The memory in userland is ok to be fragmented into various different 983 and munmap() stuff in this slot after doing this call at any time */
984 vmas. It is okay to mmap() and munmap() stuff in this slot after
985 doing this call at any time */
986
987 if (mem->slot)
988 return -EINVAL;
989
990 if (mem->guest_phys_addr)
991 return -EINVAL;
992 984
993 if (mem->userspace_addr & 0xffffful) 985 if (mem->userspace_addr & 0xffffful)
994 return -EINVAL; 986 return -EINVAL;