/*
* The migration interface for ais was introduced with kernel 4.13
* but the capability itself had been active since 4.12. As migration
- * support is considered necessary let's disable ais in the 2.10
- * machine.
+ * support is considered necessary, we only try to enable this for
+ * newer machine types if KVM_CAP_S390_AIS_MIGRATION is available.
*/
- /* kvm_vm_enable_cap(s, KVM_CAP_S390_AIS, 0); */
+ if (cpu_model_allowed() && kvm_kernel_irqchip_allowed() &&
+ kvm_check_extension(s, KVM_CAP_S390_AIS_MIGRATION)) {
+ kvm_vm_enable_cap(s, KVM_CAP_S390_AIS, 0);
+ }
kvm_set_max_memslot_size(KVM_SLOT_MAX_BYTES);
return 0;