aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm.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.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.h')
-rw-r--r--include/linux/kvm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index acbe42939089..6c322a90b92f 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -588,6 +588,7 @@ struct kvm_ppc_pvinfo {
588#define KVM_CAP_TSC_DEADLINE_TIMER 72 588#define KVM_CAP_TSC_DEADLINE_TIMER 72
589#define KVM_CAP_S390_UCONTROL 73 589#define KVM_CAP_S390_UCONTROL 73
590#define KVM_CAP_SYNC_REGS 74 590#define KVM_CAP_SYNC_REGS 74
591#define KVM_CAP_PCI_2_3 75
591 592
592#ifdef KVM_CAP_IRQ_ROUTING 593#ifdef KVM_CAP_IRQ_ROUTING
593 594
@@ -784,6 +785,9 @@ struct kvm_s390_ucas_mapping {
784/* Available with KVM_CAP_TSC_CONTROL */ 785/* Available with KVM_CAP_TSC_CONTROL */
785#define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2) 786#define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2)
786#define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3) 787#define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3)
788/* Available with KVM_CAP_PCI_2_3 */
789#define KVM_ASSIGN_SET_INTX_MASK _IOW(KVMIO, 0xa4, \
790 struct kvm_assigned_pci_dev)
787 791
788/* 792/*
789 * ioctls for vcpu fds 793 * ioctls for vcpu fds
@@ -857,6 +861,8 @@ struct kvm_s390_ucas_mapping {
857#define KVM_SET_ONE_REG _IOW(KVMIO, 0xac, struct kvm_one_reg) 861#define KVM_SET_ONE_REG _IOW(KVMIO, 0xac, struct kvm_one_reg)
858 862
859#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) 863#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
864#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)
865#define KVM_DEV_ASSIGN_MASK_INTX (1 << 2)
860 866
861struct kvm_assigned_pci_dev { 867struct kvm_assigned_pci_dev {
862 __u32 assigned_dev_id; 868 __u32 assigned_dev_id;