KVM: s390: vsie: support intervention-bypass
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tue, 24 Nov 2015 15:53:51 +0000 (16:53 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 21 Jun 2016 07:43:42 +0000 (09:43 +0200)
We can easily enable intervention bypass for guest 2, so it 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 9ed0747..347f4f6 100644 (file)
@@ -103,6 +103,7 @@ struct kvm_s390_vm_cpu_machine {
 #define KVM_S390_VM_CPU_FEAT_SIIF      3
 #define KVM_S390_VM_CPU_FEAT_GPERE     4
 #define KVM_S390_VM_CPU_FEAT_GSLS      5
+#define KVM_S390_VM_CPU_FEAT_IB                6
 struct kvm_s390_vm_cpu_feat {
        __u64 feat[16];
 };
index ce9813a..5ec598c 100644 (file)
@@ -273,6 +273,8 @@ static void kvm_s390_cpu_feat_init(void)
                allow_cpu_feat(KVM_S390_VM_CPU_FEAT_GPERE);
        if (sclp.has_gsls)
                allow_cpu_feat(KVM_S390_VM_CPU_FEAT_GSLS);
+       if (sclp.has_ib)
+               allow_cpu_feat(KVM_S390_VM_CPU_FEAT_IB);
 }
 
 int kvm_arch_init(void *opaque)
index ea65bf2..d29bd59 100644 (file)
@@ -322,6 +322,8 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
                scb_s->ecb3 |= scb_o->ecb3 & 0x01U;
        if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_SIIF))
                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;
 
        prepare_ibc(vcpu, vsie_page);
        rc = shadow_crycb(vcpu, vsie_page);