summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/priv.c
diff options
context:
space:
mode:
authorDominik Dingel2014-03-25 13:47:11 +0100
committerChristian Borntraeger2014-04-22 13:24:13 +0200
commitb31605c12f4edda7a40ad9f86985739666298c31 (patch)
tree6dbda314904aeef619702812f7b6aab836459dde /arch/s390/kvm/priv.c
parentKVM: s390: Per-vm kvm device controls (diff)
downloadkernel-qcow2-linux-b31605c12f4edda7a40ad9f86985739666298c31.tar.gz
kernel-qcow2-linux-b31605c12f4edda7a40ad9f86985739666298c31.tar.xz
kernel-qcow2-linux-b31605c12f4edda7a40ad9f86985739666298c31.zip
KVM: s390: make cmma usage conditionally
When userspace reset the guest without notifying kvm, the CMMA state of the pages might be unused, resulting in guest data corruption. To avoid this, CMMA must be enabled only if userspace understands the implications. CMMA must be enabled before vCPU creation. It can't be switched off once enabled. All subsequently created vCPUs will be enabled for CMMA according to the CMMA state of the VM. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> [remove now unnecessary calls to page_table_reset_pgste]
Diffstat (limited to 'arch/s390/kvm/priv.c')
-rw-r--r--arch/s390/kvm/priv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index 8a63e992936b..9a04d74c5fb4 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -656,7 +656,7 @@ static int handle_essa(struct kvm_vcpu *vcpu)
VCPU_EVENT(vcpu, 5, "cmma release %d pages", entries);
gmap = vcpu->arch.gmap;
vcpu->stat.instruction_essa++;
- if (!kvm_enabled_cmma() || !vcpu->arch.sie_block->cbrlo)
+ if (!kvm_s390_cmma_enabled(vcpu->kvm))
return kvm_s390_inject_program_int(vcpu, PGM_OPERATION);
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)