aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mueller <mimu@linux.vnet.ibm.com>2015-02-27 08:25:10 -0500
committerChristian Borntraeger <borntraeger@de.ibm.com>2015-03-04 04:33:25 -0500
commitfb5bf93f84c277546473be35543ed7890f6e6742 (patch)
treeaf15c8f79a9acb850421e53db917debb639ba5b8
parent981467c930bdfa4be59acbbc9f3a80eb9e3167a8 (diff)
KVM: s390: non-LPAR case obsolete during facilities mask init
With patch "include guest facilities in kvm facility test" it is no longer necessary to have special handling for the non-LPAR case. Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
-rw-r--r--arch/s390/kvm/kvm-s390.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 5a02be4628f1..f6579cfde2df 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -902,24 +902,9 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
902 if (!kvm->arch.model.fac) 902 if (!kvm->arch.model.fac)
903 goto out_nofac; 903 goto out_nofac;
904 904
905 /* Populate the facility mask initially. */
905 memcpy(kvm->arch.model.fac->mask, S390_lowcore.stfle_fac_list, 906 memcpy(kvm->arch.model.fac->mask, S390_lowcore.stfle_fac_list,
906 S390_ARCH_FAC_LIST_SIZE_BYTE); 907 S390_ARCH_FAC_LIST_SIZE_BYTE);
907
908 /*
909 * If this KVM host runs *not* in a LPAR, relax the facility bits
910 * of the kvm facility mask by all missing facilities. This will allow
911 * to determine the right CPU model by means of the remaining facilities.
912 * Live guest migration must prohibit the migration of KVMs running in
913 * a LPAR to non LPAR hosts.
914 */
915 if (!MACHINE_IS_LPAR)
916 for (i = 0; i < kvm_s390_fac_list_mask_size(); i++)
917 kvm_s390_fac_list_mask[i] &= kvm->arch.model.fac->mask[i];
918
919 /*
920 * Apply the kvm facility mask to limit the kvm supported/tolerated
921 * facility list.
922 */
923 for (i = 0; i < S390_ARCH_FAC_LIST_SIZE_U64; i++) { 908 for (i = 0; i < S390_ARCH_FAC_LIST_SIZE_U64; i++) {
924 if (i < kvm_s390_fac_list_mask_size()) 909 if (i < kvm_s390_fac_list_mask_size())
925 kvm->arch.model.fac->mask[i] &= kvm_s390_fac_list_mask[i]; 910 kvm->arch.model.fac->mask[i] &= kvm_s390_fac_list_mask[i];