KVM: s390: clean up cmma_enable check
As we already only enable CMMA when userspace requests it, we can safely move the additional checks to the request handler and avoid doing them multiple times. This also tells userspace if CMMA is available. 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:

committed by
Christian Borntraeger

parent
0df30abcd6
commit
e6db1d61c7
@@ -761,7 +761,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_s390_cmma_enabled(vcpu->kvm))
|
||||
if (!vcpu->kvm->arch.use_cmma)
|
||||
return kvm_s390_inject_program_int(vcpu, PGM_OPERATION);
|
||||
|
||||
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
|
||||
|
Reference in New Issue
Block a user