mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
f64769eb05
commit
6b9cc7fd46
2 changed files with 78 additions and 6 deletions
|
@ -392,6 +392,9 @@ struct kvm_trace_rec {
|
|||
#endif
|
||||
#define KVM_CAP_IOMMU 18
|
||||
#define KVM_CAP_NMI 19
|
||||
#if defined(CONFIG_X86)
|
||||
#define KVM_CAP_DEVICE_MSI 20
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ioctls for VM fds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue