aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenther Hutzl <[email protected]>2016-06-03 14:37:17 +0200
committerChristian Borntraeger <[email protected]>2017-01-30 11:17:30 +0100
commit2f87d942be9d0f86e44fbcbd473264c26c7f1809 (patch)
tree78fc3a6f5840aed1315cc5af7373a2cca4edafb5
parent53743aa7f14671dea6f3567ddca2f7d97454f3fe (diff)
KVM: s390: Introduce BCD Vector Instructions to the guest
We can directly forward the vector BCD instructions 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. Signed-off-by: Guenther Hutzl <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]>
-rw-r--r--arch/s390/kvm/kvm-s390.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 1fd4b854efdc..69401b8d4521 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(134)) {
+ set_kvm_facility(kvm->arch.model.fac_mask, 134);
+ set_kvm_facility(kvm->arch.model.fac_list, 134);
+ }
if (test_facility(135)) {
set_kvm_facility(kvm->arch.model.fac_mask, 135);
set_kvm_facility(kvm->arch.model.fac_list, 135);