diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2018-12-28 09:43:37 +0100 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2019-04-18 10:14:10 +0200 |
commit | 7832e91cd33f21f3cf82b003478c292915a1ec14 (patch) | |
tree | c7526a85b411edae55e157b4e71d7f5a9b971054 /arch/s390 | |
parent | KVM: s390: Fix potential spectre warnings (diff) | |
download | linux-7832e91cd33f21f3cf82b003478c292915a1ec14.tar.xz linux-7832e91cd33f21f3cf82b003478c292915a1ec14.zip |
KVM: s390: add vector enhancements facility 2 to cpumodel
If vector support is enabled, the vector enhancements facility 2
might also be enabled.
We can directly forward this facility to the guest if available
and VX is requested by user space.
Please note that user space can and will have the final decision
on the facility bits for a guests.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.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 4638303ba6a8..03ddbe5e62bc 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -657,6 +657,10 @@ int kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap) set_kvm_facility(kvm->arch.model.fac_mask, 135); set_kvm_facility(kvm->arch.model.fac_list, 135); } + if (test_facility(148)) { + set_kvm_facility(kvm->arch.model.fac_mask, 148); + set_kvm_facility(kvm->arch.model.fac_list, 148); + } r = 0; } else r = -EINVAL; |