+ return kvm_arch_has_assigned_device(kvm) &&Bad indentation/alignment.
+ irq_remapping_cap(IRQ_POSTING_CAP) &&
+ irqchip_in_kernel(kvm) && enable_apicv;
Not that it's likely to matter, but would it make sense to invert the checks so
that they're short-circuited on the faster KVM checks? E.g. fastest to slowest:
return irqchip_in_kernel(kvm) && enable_apic &&
kvm_arch_has_assigned_device(kvm) &&
irq_remapping_cap(IRQ_POSTING_CAP);