KVM: s390: enable CMMA if the interpration is available

Now that we can detect if collaborative-memory-management interpretation
is available, replace the heuristic by a real hardware detection.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
David Hildenbrand 2015-11-24 13:53:04 +01:00 committed by Christian Borntraeger
parent 09be9cb92b
commit c24cc9c8a6
1 changed files with 1 additions and 2 deletions

View File

@ -485,9 +485,8 @@ static int kvm_s390_set_mem_control(struct kvm *kvm, struct kvm_device_attr *att
unsigned int idx;
switch (attr->attr) {
case KVM_S390_VM_MEM_ENABLE_CMMA:
/* enable CMMA only for z10 and later (EDAT_1) */
ret = -EINVAL;
if (!MACHINE_IS_LPAR || !MACHINE_HAS_EDAT1)
if (!sclp.has_cmma)
break;
ret = -EBUSY;