summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2009-02-10 13:57:06 +0800
committerAvi Kivity <avi@redhat.com>2009-03-24 11:03:09 +0200
commit79950e1073150909619b7c0f9a39a2fea83a42d8 (patch)
tree5dc96ee5d69029d61b90bc18d44cb42baaa925cd /include
parent34c33d163fe509da8414a736c6328855f8c164e5 (diff)
KVM: Use irq routing API 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. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kvm.h9
-rw-r--r--include/linux/kvm_host.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 869462ca762..2163b3dd36e 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -410,8 +410,16 @@ struct kvm_irq_routing_irqchip {
__u32 pin;
};
+struct kvm_irq_routing_msi {
+ __u32 address_lo;
+ __u32 address_hi;
+ __u32 data;
+ __u32 pad;
+};
+
/* 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 +428,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;
};
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index c03a0a9a858..339eda3ca6e 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -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)