diff options
author | Sheng Yang <sheng@linux.intel.com> | 2008-11-24 01:32:53 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:55:01 -0500 |
commit | 0937c48d075ddd59ae2c12a6fa8308b9c7a63753 (patch) | |
tree | 36195da5274891f8e417f907be6cca53f8e1dda0 /include/linux | |
parent | fbac7818d8fba7e1df9f4b209777f3b67b953dd3 (diff) |
KVM: Add fields for MSI device assignment
Prepared for kvm_arch_assigned_device_msi_dispatch().
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kvm.h | 7 | ||||
-rw-r--r-- | include/linux/kvm_host.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 44fd7fa0af2b..bb283c388a24 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -507,10 +507,17 @@ struct kvm_assigned_irq { | |||
507 | __u32 guest_irq; | 507 | __u32 guest_irq; |
508 | __u32 flags; | 508 | __u32 flags; |
509 | union { | 509 | union { |
510 | struct { | ||
511 | __u32 addr_lo; | ||
512 | __u32 addr_hi; | ||
513 | __u32 data; | ||
514 | } guest_msi; | ||
510 | __u32 reserved[12]; | 515 | __u32 reserved[12]; |
511 | }; | 516 | }; |
512 | }; | 517 | }; |
513 | 518 | ||
514 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 519 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
515 | 520 | ||
521 | #define KVM_DEV_IRQ_ASSIGN_ENABLE_MSI (1 << 0) | ||
522 | |||
516 | #endif | 523 | #endif |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index c3d4b96a08fa..8091a4d90ddf 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/preempt.h> | 17 | #include <linux/preempt.h> |
18 | #include <linux/marker.h> | 18 | #include <linux/marker.h> |
19 | #include <linux/msi.h> | ||
19 | #include <asm/signal.h> | 20 | #include <asm/signal.h> |
20 | 21 | ||
21 | #include <linux/kvm.h> | 22 | #include <linux/kvm.h> |
@@ -307,8 +308,11 @@ struct kvm_assigned_dev_kernel { | |||
307 | int host_devfn; | 308 | int host_devfn; |
308 | int host_irq; | 309 | int host_irq; |
309 | int guest_irq; | 310 | int guest_irq; |
311 | struct msi_msg guest_msi; | ||
310 | #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) | 312 | #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) |
313 | #define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) | ||
311 | #define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) | 314 | #define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) |
315 | #define KVM_ASSIGNED_DEV_HOST_MSI (1 << 9) | ||
312 | unsigned long irq_requested_type; | 316 | unsigned long irq_requested_type; |
313 | int irq_source_id; | 317 | int irq_source_id; |
314 | struct pci_dev *dev; | 318 | struct pci_dev *dev; |