KVM: Fix interrupt unhalting a vcpu when it shouldn't
[pandora-kernel.git] / include / linux / kvm_host.h
index 894a56e..72d5684 100644 (file)
@@ -298,6 +298,7 @@ int kvm_arch_hardware_setup(void);
 void kvm_arch_hardware_unsetup(void);
 void kvm_arch_check_processor_compat(void *rtn);
 int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu);
+int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu);
 
 void kvm_free_physmem(struct kvm *kvm);
 
@@ -319,6 +320,13 @@ struct kvm_irq_ack_notifier {
        void (*irq_acked)(struct kvm_irq_ack_notifier *kian);
 };
 
+#define KVM_ASSIGNED_MSIX_PENDING              0x1
+struct kvm_guest_msix_entry {
+       u32 vector;
+       u16 entry;
+       u16 flags;
+};
+
 struct kvm_assigned_dev_kernel {
        struct kvm_irq_ack_notifier ack_notifier;
        struct work_struct interrupt_work;
@@ -326,13 +334,12 @@ struct kvm_assigned_dev_kernel {
        int assigned_dev_id;
        int host_busnr;
        int host_devfn;
+       unsigned int entries_nr;
        int host_irq;
        bool host_irq_disabled;
+       struct msix_entry *host_msix_entries;
        int guest_irq;
-#define KVM_ASSIGNED_DEV_GUEST_INTX    (1 << 0)
-#define KVM_ASSIGNED_DEV_GUEST_MSI     (1 << 1)
-#define KVM_ASSIGNED_DEV_HOST_INTX     (1 << 8)
-#define KVM_ASSIGNED_DEV_HOST_MSI      (1 << 9)
+       struct kvm_guest_msix_entry *guest_msix_entries;
        unsigned long irq_requested_type;
        int irq_source_id;
        int flags;