KVM: s390: only reset CMMA state if it was enabled before
There is no point in resetting the CMMA state if it was never enabled. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
e6db1d61c7
commit
c348915585
|
@ -344,6 +344,10 @@ static int kvm_s390_set_mem_control(struct kvm *kvm, struct kvm_device_attr *att
|
|||
mutex_unlock(&kvm->lock);
|
||||
break;
|
||||
case KVM_S390_VM_MEM_CLR_CMMA:
|
||||
ret = -EINVAL;
|
||||
if (!kvm->arch.use_cmma)
|
||||
break;
|
||||
|
||||
mutex_lock(&kvm->lock);
|
||||
idx = srcu_read_lock(&kvm->srcu);
|
||||
s390_reset_cmma(kvm->arch.gmap->mm);
|
||||
|
|
Loading…
Reference in New Issue