KVM: s390: vsie: support IBS interpretation
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tue, 24 Nov 2015 15:56:23 +0000 (16:56 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 21 Jun 2016 07:43:43 +0000 (09:43 +0200)
We can easily enable ibs 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 7630dd70ed5704fc58b2c6b79876195d657da702..c128567d1cd3c5badf0dfde6d1125ce70b2aa1f6 100644 (file)
@@ -105,6 +105,7 @@ struct kvm_s390_vm_cpu_machine {
 #define KVM_S390_VM_CPU_FEAT_GSLS      5
 #define KVM_S390_VM_CPU_FEAT_IB                6
 #define KVM_S390_VM_CPU_FEAT_CEI       7
+#define KVM_S390_VM_CPU_FEAT_IBS       8
 struct kvm_s390_vm_cpu_feat {
        __u64 feat[16];
 };
index 1c1188ba104254f5995c97f40e5a3e72c4e8239d..8ba7a98a50cfbf09a6ec543e9c56ae153a4daede 100644 (file)
@@ -277,6 +277,8 @@ static void kvm_s390_cpu_feat_init(void)
                allow_cpu_feat(KVM_S390_VM_CPU_FEAT_IB);
        if (sclp.has_cei)
                allow_cpu_feat(KVM_S390_VM_CPU_FEAT_CEI);
+       if (sclp.has_ibs)
+               allow_cpu_feat(KVM_S390_VM_CPU_FEAT_IBS);
 }
 
 int kvm_arch_init(void *opaque)
index f3a4a0bad4a7e873fecce4445c0e18f17b74ea98..3ececbbd6bb08432517fc891e42c97ccb7addedf 100644 (file)
@@ -111,6 +111,8 @@ static int prepare_cpuflags(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
                newflags |= cpuflags & CPUSTAT_P;
        if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_GSLS))
                newflags |= cpuflags & CPUSTAT_SM;
+       if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_IBS))
+               newflags |= cpuflags & CPUSTAT_IBS;
 
        atomic_set(&scb_s->cpuflags, newflags);
        return 0;