forked from luck/tmp_suning_uos_patched
KVM: s390: Fix for master (4.12)
- The newly created AIS capability enables the feature unconditionally and ignores the cpu model -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJZOVMaAAoJEBF7vIC1phx8d9oP/1ReHTErJN/MBk3EKuHSX2PY kgV27DSDk/kxltFL0giXFNQG8CG+eOQ/uWByg9B7ZrRHwsdpsdr5ErWGHocwu0uA sM8qm64+79QHb6sb7hmm0VpfmQ6LT8ovbOPUJtvfb4X7+rbd0fNCZxfrDLSzvMTX yccFkNymx1c+zEjbhmy0CgTgikNFkiRzC8nWmfwg6De9vkykDRHDZ/hz6LBPb1Ln uw6g9jZq/2Msi0pU1Y/mZvNkade2HdXEWIQepwggQRp+xNYH84gk9CnQ5MsSJ+94 EfVyQXOlMnuB/H0wJOKz6KMQ9OjYguBwFsRUEaB2Xqng0k3Y975UQnQ3iRN7p9Kd NgmGOhlfRCfv1vi/l2gPhVHMnEJqzVHso7HrLXqkHUDY9KagFdLM5nF5GRAtj0bW nRr6K4CioLS9mILEQgxwOprvrfKH37dUi5mb/0HHzyYPytwOfiWkKq5r9OQbbJks nY2t7aBn3VliFeJtWbst7ntR54kfm589liAofO/TjrhSMtZANm6BrHe39w9pMzfE PcOZYs8V1HW4KLlB6sky3ghBrK1OTTaCdOgbWE4TeoQWDEIDoagYVxSzcHZ25aAc rnFshZOsZlXIJilCxIyalmJkTKr3HWW+vE94F8H8Ft0k0nrrDwWWYhISUjbigbZz zu7jltSocuep0c7OTzKM =MjM+ -----END PGP SIGNATURE----- Merge tag 'kvm-s390-master-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Fix for master (4.12) - The newly created AIS capability enables the feature unconditionally and ignores the cpu model
This commit is contained in:
commit
9e53932d88
|
@ -541,7 +541,6 @@ struct kvm_s390_float_interrupt {
|
||||||
struct mutex ais_lock;
|
struct mutex ais_lock;
|
||||||
u8 simm;
|
u8 simm;
|
||||||
u8 nimm;
|
u8 nimm;
|
||||||
int ais_enabled;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct kvm_hw_wp_info_arch {
|
struct kvm_hw_wp_info_arch {
|
||||||
|
|
|
@ -2160,7 +2160,7 @@ static int modify_ais_mode(struct kvm *kvm, struct kvm_device_attr *attr)
|
||||||
struct kvm_s390_ais_req req;
|
struct kvm_s390_ais_req req;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (!fi->ais_enabled)
|
if (!test_kvm_facility(kvm, 72))
|
||||||
return -ENOTSUPP;
|
return -ENOTSUPP;
|
||||||
|
|
||||||
if (copy_from_user(&req, (void __user *)attr->addr, sizeof(req)))
|
if (copy_from_user(&req, (void __user *)attr->addr, sizeof(req)))
|
||||||
|
@ -2204,7 +2204,7 @@ static int kvm_s390_inject_airq(struct kvm *kvm,
|
||||||
};
|
};
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (!fi->ais_enabled || !adapter->suppressible)
|
if (!test_kvm_facility(kvm, 72) || !adapter->suppressible)
|
||||||
return kvm_s390_inject_vm(kvm, &s390int);
|
return kvm_s390_inject_vm(kvm, &s390int);
|
||||||
|
|
||||||
mutex_lock(&fi->ais_lock);
|
mutex_lock(&fi->ais_lock);
|
||||||
|
|
|
@ -558,7 +558,6 @@ static int kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap)
|
||||||
} else {
|
} else {
|
||||||
set_kvm_facility(kvm->arch.model.fac_mask, 72);
|
set_kvm_facility(kvm->arch.model.fac_mask, 72);
|
||||||
set_kvm_facility(kvm->arch.model.fac_list, 72);
|
set_kvm_facility(kvm->arch.model.fac_list, 72);
|
||||||
kvm->arch.float_int.ais_enabled = 1;
|
|
||||||
r = 0;
|
r = 0;
|
||||||
}
|
}
|
||||||
mutex_unlock(&kvm->lock);
|
mutex_unlock(&kvm->lock);
|
||||||
|
@ -1533,7 +1532,6 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
|
||||||
mutex_init(&kvm->arch.float_int.ais_lock);
|
mutex_init(&kvm->arch.float_int.ais_lock);
|
||||||
kvm->arch.float_int.simm = 0;
|
kvm->arch.float_int.simm = 0;
|
||||||
kvm->arch.float_int.nimm = 0;
|
kvm->arch.float_int.nimm = 0;
|
||||||
kvm->arch.float_int.ais_enabled = 0;
|
|
||||||
spin_lock_init(&kvm->arch.float_int.lock);
|
spin_lock_init(&kvm->arch.float_int.lock);
|
||||||
for (i = 0; i < FIRQ_LIST_COUNT; i++)
|
for (i = 0; i < FIRQ_LIST_COUNT; i++)
|
||||||
INIT_LIST_HEAD(&kvm->arch.float_int.lists[i]);
|
INIT_LIST_HEAD(&kvm->arch.float_int.lists[i]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user