]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: s390: vsie: support conditional-external-interception
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tue, 24 Nov 2015 15:54:37 +0000 (16:54 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 21 Jun 2016 07:43:42 +0000 (09:43 +0200)
We can easily enable cei for guest 2, so he can use it for guest 3.

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/include/uapi/asm/kvm.h
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/vsie.c

index 347f4f61b6565040efeb0cca856a468dc004f235..7630dd70ed5704fc58b2c6b79876195d657da702 100644 (file)
@@ -104,6 +104,7 @@ struct kvm_s390_vm_cpu_machine {
 #define KVM_S390_VM_CPU_FEAT_GPERE     4
 #define KVM_S390_VM_CPU_FEAT_GSLS      5
 #define KVM_S390_VM_CPU_FEAT_IB                6
+#define KVM_S390_VM_CPU_FEAT_CEI       7
 struct kvm_s390_vm_cpu_feat {
        __u64 feat[16];
 };
index 5ec598ca7660a4d8483cabffe0c656d2036f8e43..1c1188ba104254f5995c97f40e5a3e72c4e8239d 100644 (file)
@@ -275,6 +275,8 @@ static void kvm_s390_cpu_feat_init(void)
                allow_cpu_feat(KVM_S390_VM_CPU_FEAT_GSLS);
        if (sclp.has_ib)
                allow_cpu_feat(KVM_S390_VM_CPU_FEAT_IB);
+       if (sclp.has_cei)
+               allow_cpu_feat(KVM_S390_VM_CPU_FEAT_CEI);
 }
 
 int kvm_arch_init(void *opaque)
index d29bd592fb3d6e0c8434703b138c9ca9ac7a6f7d..f3a4a0bad4a7e873fecce4445c0e18f17b74ea98 100644 (file)
@@ -324,6 +324,8 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
                scb_s->eca |= scb_o->eca & 0x00000001U;
        if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_IB))
                scb_s->eca |= scb_o->eca & 0x40000000U;
+       if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_CEI))
+               scb_s->eca |= scb_o->eca & 0x80000000U;
 
        prepare_ibc(vcpu, vsie_page);
        rc = shadow_crycb(vcpu, vsie_page);