aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2015-11-24 10:56:23 -0500
committerChristian Borntraeger <borntraeger@de.ibm.com>2016-06-21 03:43:43 -0400
commit7fd7f39daa3da822122124730437c4f37e4d82de (patch)
treeede479d5258ac059dcc49aeb28a6617042bf7b3d
parent13ee3f678b1117d7511a2c5e10549f7c37f4cadf (diff)
KVM: s390: vsie: support IBS interpretation
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>
-rw-r--r--arch/s390/include/uapi/asm/kvm.h1
-rw-r--r--arch/s390/kvm/kvm-s390.c2
-rw-r--r--arch/s390/kvm/vsie.c2
3 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/include/uapi/asm/kvm.h b/arch/s390/include/uapi/asm/kvm.h
index 7630dd70ed57..c128567d1cd3 100644
--- a/arch/s390/include/uapi/asm/kvm.h
+++ b/arch/s390/include/uapi/asm/kvm.h
@@ -105,6 +105,7 @@ struct kvm_s390_vm_cpu_machine {
105#define KVM_S390_VM_CPU_FEAT_GSLS 5 105#define KVM_S390_VM_CPU_FEAT_GSLS 5
106#define KVM_S390_VM_CPU_FEAT_IB 6 106#define KVM_S390_VM_CPU_FEAT_IB 6
107#define KVM_S390_VM_CPU_FEAT_CEI 7 107#define KVM_S390_VM_CPU_FEAT_CEI 7
108#define KVM_S390_VM_CPU_FEAT_IBS 8
108struct kvm_s390_vm_cpu_feat { 109struct kvm_s390_vm_cpu_feat {
109 __u64 feat[16]; 110 __u64 feat[16];
110}; 111};
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 1c1188ba1042..8ba7a98a50cf 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -277,6 +277,8 @@ static void kvm_s390_cpu_feat_init(void)
277 allow_cpu_feat(KVM_S390_VM_CPU_FEAT_IB); 277 allow_cpu_feat(KVM_S390_VM_CPU_FEAT_IB);
278 if (sclp.has_cei) 278 if (sclp.has_cei)
279 allow_cpu_feat(KVM_S390_VM_CPU_FEAT_CEI); 279 allow_cpu_feat(KVM_S390_VM_CPU_FEAT_CEI);
280 if (sclp.has_ibs)
281 allow_cpu_feat(KVM_S390_VM_CPU_FEAT_IBS);
280} 282}
281 283
282int kvm_arch_init(void *opaque) 284int kvm_arch_init(void *opaque)
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index f3a4a0bad4a7..3ececbbd6bb0 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -111,6 +111,8 @@ static int prepare_cpuflags(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
111 newflags |= cpuflags & CPUSTAT_P; 111 newflags |= cpuflags & CPUSTAT_P;
112 if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_GSLS)) 112 if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_GSLS))
113 newflags |= cpuflags & CPUSTAT_SM; 113 newflags |= cpuflags & CPUSTAT_SM;
114 if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_IBS))
115 newflags |= cpuflags & CPUSTAT_IBS;
114 116
115 atomic_set(&scb_s->cpuflags, newflags); 117 atomic_set(&scb_s->cpuflags, newflags);
116 return 0; 118 return 0;