diff options
author | Sheng Yang <sheng@linux.intel.com> | 2008-11-24 01:32:56 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:55:02 -0500 |
commit | 6b9cc7fd469869bed38831c5adac3f59dc25eaf5 (patch) | |
tree | 63d526ff94b891116c37bf9705e42a45479271f0 /include/linux/kvm.h | |
parent | f64769eb05565c74d7fce6fa75d65924f9cdaf79 (diff) |
KVM: Enable MSI for device assignment
We enable guest MSI and host MSI support in this patch. The userspace want to
enable MSI should set KVM_DEV_IRQ_ASSIGN_ENABLE_MSI in the assigned_irq's flag.
Function would return -ENOTTY if can't enable MSI, userspace shouldn't set MSI
Enable bit when KVM_ASSIGN_IRQ return -ENOTTY with
KVM_DEV_IRQ_ASSIGN_ENABLE_MSI.
Userspace can tell the support of MSI device from #ifdef KVM_CAP_DEVICE_MSI.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r-- | include/linux/kvm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index bb283c388a24..0997e6f5490c 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -392,6 +392,9 @@ struct kvm_trace_rec { | |||
392 | #endif | 392 | #endif |
393 | #define KVM_CAP_IOMMU 18 | 393 | #define KVM_CAP_IOMMU 18 |
394 | #define KVM_CAP_NMI 19 | 394 | #define KVM_CAP_NMI 19 |
395 | #if defined(CONFIG_X86) | ||
396 | #define KVM_CAP_DEVICE_MSI 20 | ||
397 | #endif | ||
395 | 398 | ||
396 | /* | 399 | /* |
397 | * ioctls for VM fds | 400 | * ioctls for VM fds |