]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
KVM: s390: add vector BCD enhancements facility to cpumodel
authorChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 16 Jul 2019 06:54:00 +0000 (08:54 +0200)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:45:13 +0000 (09:45 -0600)
BugLink: https://bugs.launchpad.net/bugs/1836153
If vector support is enabled, the vector BCD enhancements facility
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>
(cherry picked from commit d5cb6ab1e3d4d7e0648a167f6290e89f6e86964e)
Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/s390/kvm/kvm-s390.c

index 8378668286f49c9b2861d4caa5095d372949f6a4..009d763a44aad91bf35fd0d56f8c18e7b7318583 100644 (file)
@@ -603,6 +603,10 @@ static int kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap)
                                set_kvm_facility(kvm->arch.model.fac_mask, 148);
                                set_kvm_facility(kvm->arch.model.fac_list, 148);
                        }
+                       if (test_facility(152)) {
+                               set_kvm_facility(kvm->arch.model.fac_mask, 152);
+                               set_kvm_facility(kvm->arch.model.fac_list, 152);
+                       }
                        r = 0;
                } else
                        r = -EINVAL;