diff options
author | 2016-03-04 11:55:56 +0100 | |
---|---|---|
committer | 2016-05-09 13:33:02 +0200 | |
commit | d6af0b491b1f675e5e5a12c5587f804c698a6ba5 (patch) | |
tree | 790fa16ed911d1ad35620934e5e1544cbcba39fd /arch/s390/kvm | |
parent | KVM: s390: support NQ only if the facility is enabled for the guest (diff) | |
download | linux-d6af0b491b1f675e5e5a12c5587f804c698a6ba5.tar.gz linux-d6af0b491b1f675e5e5a12c5587f804c698a6ba5.tar.bz2 linux-d6af0b491b1f675e5e5a12c5587f804c698a6ba5.zip |
KVM: s390: enable PFMFI only if guest has EDAT1
Only enable PFMF interpretation if the necessary facility (EDAT1) is
available, otherwise the pfmf handler in priv.c will inject an exception
Reviewed-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Reviewed-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>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 668c087513e5..13b3f5eb49be 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -1649,7 +1649,8 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) if (test_kvm_facility(vcpu->kvm, 50) && test_kvm_facility(vcpu->kvm, 73)) vcpu->arch.sie_block->ecb |= 0x10; - vcpu->arch.sie_block->ecb2 = 8; + if (test_kvm_facility(vcpu->kvm, 8)) + vcpu->arch.sie_block->ecb2 |= 0x08; vcpu->arch.sie_block->eca = 0xC1002000U; if (sclp.has_siif) vcpu->arch.sie_block->eca |= 1; |