KVM: s390: vsie: support host-protection-interruption
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Fri, 27 Nov 2015 11:34:28 +0000 (12:34 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 21 Jun 2016 07:43:35 +0000 (09:43 +0200)
Introduced with ESOP, therefore available for the guest if it
is allowed to use ESOP.

Acked-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/vsie.c

index 7c9835b0a33f7b29b474038c91654b62f7536a87..aaed63ce29b23d160be5a17f1691aa94afc4ece8 100644 (file)
@@ -240,6 +240,9 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
 
        /* MVPG and Protection Exception Interpretation are always available */
        scb_s->eca |= scb_o->eca & 0x01002000U;
+       /* Host-protection-interruption introduced with ESOP */
+       if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_ESOP))
+               scb_s->ecb |= scb_o->ecb & 0x02U;
 
        prepare_ibc(vcpu, vsie_page);
 out: