summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/vsie.c
diff options
context:
space:
mode:
authorJanosch Frank <frankja@linux.vnet.ibm.com>2016-08-04 09:57:36 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2017-01-30 11:17:28 +0100
commitcd1836f583d78bdd15ef748f4d85bf007569c7ad (patch)
treeae8d9a7818721f5e006d19d8ea538bb4089cce0b /arch/s390/kvm/vsie.c
parenta679c547d19ded9b7d1a88e17cf5e5b69ac619b6 (diff)
downloadblackbird-op-linux-cd1836f583d78bdd15ef748f4d85bf007569c7ad.tar.gz
blackbird-op-linux-cd1836f583d78bdd15ef748f4d85bf007569c7ad.zip
KVM: s390: instruction-execution-protection support
The new Instruction Execution Protection needs to be enabled before the guest can use it. Therefore we pass the IEP facility bit to the guest and enable IEP interpretation. Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/vsie.c')
-rw-r--r--arch/s390/kvm/vsie.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index d8673e243f13..ed62c6d57d93 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -324,6 +324,9 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
/* Run-time-Instrumentation */
if (test_kvm_facility(vcpu->kvm, 64))
scb_s->ecb3 |= scb_o->ecb3 & 0x01U;
+ /* Instruction Execution Prevention */
+ if (test_kvm_facility(vcpu->kvm, 130))
+ scb_s->ecb2 |= scb_o->ecb2 & 0x20U;
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))
OpenPOWER on IntegriCloud