[PATCH 1/3] qemu-kvm: Ioctl for in-kernel mask support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
---
 qemu-kvm.c |   15 +++++++++++++++
 qemu-kvm.h |    6 ++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 733d0a9..ba6db51 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1092,6 +1092,21 @@ int kvm_assign_set_msix_entry(kvm_context_t kvm,
 {
     return kvm_vm_ioctl(kvm_state, KVM_ASSIGN_SET_MSIX_ENTRY, entry);
 }
+
+#ifdef KVM_CAP_DEVICE_MSIX_MASK
+int kvm_assign_get_msix_entry(kvm_context_t kvm,
+                              struct kvm_assigned_msix_entry *entry)
+{
+    return kvm_vm_ioctl(kvm_state, KVM_ASSIGN_GET_MSIX_ENTRY, entry);
+}
+
+int kvm_assign_reg_msix_mmio(kvm_context_t kvm,
+                           struct kvm_assigned_msix_mmio *msix_mmio)
+{
+    return kvm_vm_ioctl(kvm_state, KVM_ASSIGN_REG_MSIX_MMIO, msix_mmio);
+}
+#endif
+
 #endif
 
 #if defined(KVM_CAP_IRQFD) && defined(CONFIG_EVENTFD)
diff --git a/qemu-kvm.h b/qemu-kvm.h
index 9c08ab4..1afdd42 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -743,6 +743,12 @@ int kvm_assign_set_msix_nr(kvm_context_t kvm,
                            struct kvm_assigned_msix_nr *msix_nr);
 int kvm_assign_set_msix_entry(kvm_context_t kvm,
                               struct kvm_assigned_msix_entry *entry);
+#ifdef KVM_CAP_DEVICE_MSIX_MASK
+int kvm_assign_get_msix_entry(kvm_context_t kvm,
+                              struct kvm_assigned_msix_entry *entry);
+int kvm_assign_reg_msix_mmio(kvm_context_t kvm,
+                           struct kvm_assigned_msix_mmio *msix_mmio);
+#endif
 #endif
 
 #else                           /* !CONFIG_KVM */
-- 
1.7.0.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux