Skip to contentSkip to conversation

KVM: Using irq routing table for MSI

PATCH Applied Sheng Yang 2 participants 2 messages Feb 10, 2009 – Feb 11, 2009 KVM

lore
Share & tools
lore

Sheng Yang

author
#0 lore raw

PATCH 1/1 KVM: Using irq routing table for MSI

Merge MSI userspace interface with IRQ routing table. Notice the API have been changed, and using IRQ routing table would be the only interface kvm-userspace supported.

---
 include/linux/kvm.h      |    8 +++++
 include/linux/kvm_host.h |    2 +-
 virt/kvm/irq_comm.c      |   78 +++++++++++++++++++++++++++++++++++++++++----
 virt/kvm/kvm_main.c      |   70 +++--------------------------------------
 4 files changed, 85 insertions(+), 73 deletions(-)
include/linux/kvm.h +8 -0
index 869462c..c1425ab 100644
@@ -410,8 +410,15 @@ struct kvm_irq_routing_irqchip {
 	__u32 pin;
 };
 
+struct kvm_irq_routing_msi {
+	__u32 address_lo;
+	__u32 address_hi;
+	__u32 data;
+};
+
 /* gsi routing entry types */
 #define KVM_IRQ_ROUTING_IRQCHIP 1
+#define KVM_IRQ_ROUTING_MSI 2
 
 struct kvm_irq_routing_entry {
 	__u32 gsi;
@@ -420,6 +427,7 @@ struct kvm_irq_routing_entry {
 	__u32 pad;
 	union {
 		struct kvm_irq_routing_irqchip irqchip;
+		struct kvm_irq_routing_msi msi;
 		__u32 pad[8];
 	} u;
 };
include/linux/kvm_host.h +1 -1
index c03a0a9..339eda3 100644
@@ -116,6 +116,7 @@ struct kvm_kernel_irq_routing_entry {
 			unsigned irqchip;
 			unsigned pin;
 		} irqchip;
+		struct msi_msg msi;
 	};
 	struct list_head link;
 };
@@ -327,7 +328,6 @@ struct kvm_assigned_dev_kernel {
 	int host_irq;
 	bool host_irq_disabled;
 	int guest_irq;
-	struct msi_msg guest_msi;
 #define KVM_ASSIGNED_DEV_GUEST_INTX	(1 << 0)
 #define KVM_ASSIGNED_DEV_GUEST_MSI	(1 << 1)
 #define KVM_ASSIGNED_DEV_HOST_INTX	(1 << 8)
virt/kvm/irq_comm.c +71 -7

107 lines not on this page · raw message

virt/kvm/kvm_main.c +5 -65

102 lines not on this page · raw message

Signature · 1 line
1.5.4.5
Applied
#1 lore raw
Quoted 5 lines · Sheng Yang

Merge MSI userspace interface with IRQ routing table. Notice the API have been changed, and using IRQ routing table would be the only interface kvm-userspace supported.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function