aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-02-28 08:19:54 -0500
committerAvi Kivity <avi@redhat.com>2012-03-08 07:11:36 -0500
commit07700a94b00a4fcbbfb07d1b72dc112a0e036735 (patch)
treee4a8045d6a44906463102a04c7a87337c38e16aa /include/linux/kvm_host.h
parent3e515705a1f46beb1c942bb8043c16f8ac7b1e9e (diff)
KVM: Allow host IRQ sharing for assigned PCI 2.3 devices
PCI 2.3 allows to generically disable IRQ sources at device level. This enables us to share legacy IRQs of such devices with other host devices when passing them to a guest. The new IRQ sharing feature introduced here is optional, user space has to request it explicitly. Moreover, user space can inform us about its view of PCI_COMMAND_INTX_DISABLE so that we can avoid unmasking the interrupt and signaling it if the guest masked it via the virtualized PCI config space. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index e42d85ae854..ec171c1d087 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -546,6 +546,7 @@ struct kvm_assigned_dev_kernel {
546 unsigned int entries_nr; 546 unsigned int entries_nr;
547 int host_irq; 547 int host_irq;
548 bool host_irq_disabled; 548 bool host_irq_disabled;
549 bool pci_2_3;
549 struct msix_entry *host_msix_entries; 550 struct msix_entry *host_msix_entries;
550 int guest_irq; 551 int guest_irq;
551 struct msix_entry *guest_msix_entries; 552 struct msix_entry *guest_msix_entries;
@@ -555,6 +556,7 @@ struct kvm_assigned_dev_kernel {
555 struct pci_dev *dev; 556 struct pci_dev *dev;
556 struct kvm *kvm; 557 struct kvm *kvm;
557 spinlock_t intx_lock; 558 spinlock_t intx_lock;
559 struct mutex intx_mask_lock;
558 char irq_name[32]; 560 char irq_name[32];
559 struct pci_saved_state *pci_saved_state; 561 struct pci_saved_state *pci_saved_state;
560}; 562};