diff mbox

[PULL,2/2] s390x/kvm: fix cmma reset for KVM

Message ID 20170124150823.30162-3-cornelia.huck@de.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Cornelia Huck Jan. 24, 2017, 3:08 p.m. UTC
From: Christian Borntraeger <borntraeger@de.ibm.com>

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
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 target/s390x/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 5ad0acbc82..6ed387671e 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;
     }