[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <946b71e77a34666a9b8c419c5a467d1628b50fa0.1581305609.git.zhabin@linux.alibaba.com>
Date: Mon, 10 Feb 2020 17:05:21 +0800
From: Zha Bin <zhabin@...ux.alibaba.com>
To: linux-kernel@...r.kernel.org
Cc: mst@...hat.com, jasowang@...hat.com, slp@...hat.com,
virtio-dev@...ts.oasis-open.org, qemu-devel@...gnu.org,
gerry@...ux.alibaba.com, zhabin@...ux.alibaba.com,
jing2.liu@...ux.intel.com, chao.p.peng@...ux.intel.com
Subject: [PATCH v2 5/5] x86: virtio-mmio: support virtio-mmio with MSI for x86
From: Liu Jiang <gerry@...ux.alibaba.com>
virtio-mmio supports a generic MSI irq domain for all archs. This
patch adds the x86 architecture support.
Signed-off-by: Liu Jiang <gerry@...ux.alibaba.com>
Co-developed-by: Zha Bin <zhabin@...ux.alibaba.com>
Signed-off-by: Zha Bin <zhabin@...ux.alibaba.com>
Co-developed-by: Jing Liu <jing2.liu@...ux.intel.com>
Signed-off-by: Jing Liu <jing2.liu@...ux.intel.com>
Co-developed-by: Chao Peng <chao.p.peng@...ux.intel.com>
Signed-off-by: Chao Peng <chao.p.peng@...ux.intel.com>
---
arch/x86/kernel/apic/msi.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c
index 159bd0c..2fcd602 100644
--- a/arch/x86/kernel/apic/msi.c
+++ b/arch/x86/kernel/apic/msi.c
@@ -45,7 +45,11 @@ static void __irq_msi_compose_msg(struct irq_cfg *cfg, struct msi_msg *msg)
MSI_DATA_VECTOR(cfg->vector);
}
-static void irq_msi_compose_msg(struct irq_data *data, struct msi_msg *msg)
+/*
+ * x86 PCI-MSI/HPET/DMAR related method.
+ * Also can be used as arch specific method for virtio-mmio MSI.
+ */
+void irq_msi_compose_msg(struct irq_data *data, struct msi_msg *msg)
{
__irq_msi_compose_msg(irqd_cfg(data), msg);
}
@@ -166,6 +170,11 @@ static void irq_msi_update_msg(struct irq_data *irqd, struct irq_cfg *cfg)
return ret;
}
+struct irq_domain *arch_msi_root_irq_domain(void)
+{
+ return x86_vector_domain;
+}
+
/*
* IRQ Chip for MSI PCI/PCI-X/PCI-Express Devices,
* which implement the MSI or MSI-X Capability Structure.
--
1.8.3.1
Powered by blists - more mailing lists