From: Christian Borntraeger Date: Tue, 24 Jan 2017 13:28:13 +0000 (+0100) Subject: s390x/kvm: fix cmma reset for KVM X-Git-Tag: v2.8.1~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5fb07a7b6ca07580f5c2bf98e933128f7bf1fcbd;p=thirdparty%2Fqemu.git s390x/kvm: fix cmma reset for KVM We must reset the CMMA states for normal memory (when not on mem path), but the current code does the opposite. This was unnoticed for some time as the kernel since 4.6 also had a bug which mostly disabled the paging optimizations. Fixes: 07059effd14e ("s390x/kvm: let the CPU model control CMM(A)") Cc: qemu-stable@nongnu.org # v2.8 Signed-off-by: Christian Borntraeger Signed-off-by: Cornelia Huck (cherry picked from commit 0cf4d747cb8d053e6a6161aadfd3531fa1a62be1) Signed-off-by: Michael Roth --- diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 97afe02599b..5fc4ed1bbdc 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -197,7 +197,7 @@ void kvm_s390_cmma_reset(void) .attr = KVM_S390_VM_MEM_CLR_CMMA, }; - if (!mem_path || !kvm_s390_cmma_available()) { + if (mem_path || !kvm_s390_cmma_available()) { return; }