diff options
author | Maxim Samoylov <max7255@linux.vnet.ibm.com> | 2016-02-10 10:31:23 +0100 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2017-01-30 11:17:29 +0100 |
commit | 53743aa7f14671dea6f3567ddca2f7d97454f3fe (patch) | |
tree | 9ac43abf772253dcbaa01e1bd4e076ab21b2c602 /arch/s390 | |
parent | 27f67f8727843fbbbcd05a003183af79693759e9 (diff) | |
download | blackbird-op-linux-53743aa7f14671dea6f3567ddca2f7d97454f3fe.tar.gz blackbird-op-linux-53743aa7f14671dea6f3567ddca2f7d97454f3fe.zip |
KVM: s390: Introduce Vector Enhancements facility 1 to the guest
We can directly forward the vector enhancement facility 1 to the guest
if available and VX is requested by user space.
Please note that user space will have to take care of the final state
of the facility bit when migrating to older machines.
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Maxim Samoylov <max7255@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 4f74511015b8..1fd4b854efdc 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -505,6 +505,10 @@ static int kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap) } else if (MACHINE_HAS_VX) { set_kvm_facility(kvm->arch.model.fac_mask, 129); set_kvm_facility(kvm->arch.model.fac_list, 129); + if (test_facility(135)) { + set_kvm_facility(kvm->arch.model.fac_mask, 135); + set_kvm_facility(kvm->arch.model.fac_list, 135); + } r = 0; } else r = -EINVAL; |