diff options
author | Dominik Dingel <dingel@linux.vnet.ibm.com> | 2015-06-18 13:17:11 +0200 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2015-07-29 11:02:32 +0200 |
commit | c348915585af12a7fc6453524d9835830dba574b (patch) | |
tree | e34b3ad22cf8b9a6fe86b720f360896240987dc9 /arch/s390 | |
parent | e6db1d61c7cc05dd3c8b787a0bd47dcb94800300 (diff) | |
download | blackbird-obmc-linux-c348915585af12a7fc6453524d9835830dba574b.tar.gz blackbird-obmc-linux-c348915585af12a7fc6453524d9835830dba574b.zip |
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>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 641639b2fbd0..3772947ac194 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -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); |