]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/kvm_host.h
OMAP1: clock: Typo fix for clock in omap1
[linux-2.6-omap-h63xx.git] / include / linux / kvm_host.h
index 99963f36a6db87d960122bbb2c75042d0186e370..894a56e365e855e549b12563facda8f24405c15a 100644 (file)
@@ -37,6 +37,7 @@
 #define KVM_REQ_PENDING_TIMER      5
 #define KVM_REQ_UNHALT             6
 #define KVM_REQ_MMU_SYNC           7
+#define KVM_REQ_KVMCLOCK_UPDATE    8
 
 #define KVM_USERSPACE_IRQ_SOURCE_ID    0
 
@@ -107,6 +108,20 @@ struct kvm_memory_slot {
        int user_alloc;
 };
 
+struct kvm_kernel_irq_routing_entry {
+       u32 gsi;
+       int (*set)(struct kvm_kernel_irq_routing_entry *e,
+                   struct kvm *kvm, int level);
+       union {
+               struct {
+                       unsigned irqchip;
+                       unsigned pin;
+               } irqchip;
+               struct msi_msg msi;
+       };
+       struct list_head link;
+};
+
 struct kvm {
        struct mutex lock; /* protects the vcpus array and APIC accesses */
        spinlock_t mmu_lock;
@@ -128,6 +143,7 @@ struct kvm {
 #endif
 
 #ifdef CONFIG_HAVE_KVM_IRQCHIP
+       struct list_head irq_routing; /* of kvm_kernel_irq_routing_entry */
        struct hlist_head mask_notifier_list;
 #endif
 
@@ -313,7 +329,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)
@@ -337,8 +352,8 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq,
                                      struct kvm_irq_mask_notifier *kimn);
 void kvm_fire_mask_notifiers(struct kvm *kvm, int irq, bool mask);
 
-void kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level);
-void kvm_notify_acked_irq(struct kvm *kvm, unsigned gsi);
+int kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level);
+void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin);
 void kvm_register_irq_ack_notifier(struct kvm *kvm,
                                   struct kvm_irq_ack_notifier *kian);
 void kvm_unregister_irq_ack_notifier(struct kvm_irq_ack_notifier *kian);
@@ -480,4 +495,21 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se
 }
 #endif
 
+#ifdef CONFIG_HAVE_KVM_IRQCHIP
+
+#define KVM_MAX_IRQ_ROUTES 1024
+
+int kvm_setup_default_irq_routing(struct kvm *kvm);
+int kvm_set_irq_routing(struct kvm *kvm,
+                       const struct kvm_irq_routing_entry *entries,
+                       unsigned nr,
+                       unsigned flags);
+void kvm_free_irq_routing(struct kvm *kvm);
+
+#else
+
+static inline void kvm_free_irq_routing(struct kvm *kvm) {}
+
+#endif
+
 #endif