KVM: s390: enable cei only if available
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 4 Apr 2016 13:49:34 +0000 (15:49 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 10 Jun 2016 10:07:23 +0000 (12:07 +0200)
Let's only enable conditional-external-interruption if the facility is
actually available.

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c

index 340fb405bc2386cb06478b4854e08b9971a61f61..1a239a6748fe2fb766630b9ecf1f532ddc956b14 100644 (file)
@@ -1845,7 +1845,9 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
 
        if (test_kvm_facility(vcpu->kvm, 8))
                vcpu->arch.sie_block->ecb2 |= 0x08;
-       vcpu->arch.sie_block->eca = 0x81002000U;
+       vcpu->arch.sie_block->eca = 0x1002000U;
+       if (sclp.has_cei)
+               vcpu->arch.sie_block->eca |= 0x80000000U;
        if (sclp.has_ib)
                vcpu->arch.sie_block->eca |= 0x40000000U;
        if (sclp.has_siif)