@@ -185,6 +185,7 @@ struct x86_msi_ops {
int (*setup_hpet_msi)(unsigned int irq, unsigned int id);
u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag);
u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag);
+ bool (*supports_multivector)(struct pci_dev *dev);
};
struct IO_APIC_route_entry;
@@ -148,6 +148,12 @@ u32 arch_msix_mask_irq(struct msi_desc *desc, u32 flag)
{
return x86_msi.msix_mask_irq(desc, flag);
}
+bool arch_supports_multivector_msi(struct pci_dev *dev)
+{
+ if (x86_msi.supports_multivector)
+ return x86_msi.supports_multivector(dev);
+ return false;
+}
#endif
struct x86_io_apic_ops x86_io_apic_ops = {
@@ -160,6 +160,11 @@ static void eoi_ioapic_pin_remapped(int apic, int pin, int vector)
io_apic_eoi(apic, pin);
}
+static bool remapped_supports_multivector(struct pci_dev *dev)
+{
+ return true;
+}
+
static void __init irq_remapping_modify_x86_ops(void)
{
x86_io_apic_ops.disable = irq_remapping_disable_io_apic;
@@ -169,6 +174,7 @@ static void __init irq_remapping_modify_x86_ops(void)
x86_msi.setup_msi_irqs = irq_remapping_setup_msi_irqs;
x86_msi.setup_hpet_msi = setup_hpet_msi_remapped;
x86_msi.compose_msi_msg = compose_remapped_msi_msg;
+ x86_msi.supports_multivector = remapped_supports_multivector;
}
static __init int setup_nointremap(char *str)
x86 does support multivector MSI, but only when using interrupt remapping. Extend x86_msi_ops to add an optional callback for this and assume unsupported when not present. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> --- arch/x86/include/asm/x86_init.h | 1 + arch/x86/kernel/x86_init.c | 6 ++++++ drivers/iommu/irq_remapping.c | 6 ++++++ 3 files changed, 13 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html