diff mbox

[06/19] qemu-kvm: Move kvm_device_intx_set_mask service

Message ID 2d888247deedee0c316c823e619d59bdfb954a47.1345125266.git.jan.kiszka@siemens.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kiszka Aug. 16, 2012, 1:54 p.m. UTC
Move kvm_device_intx_set_mask prototype and implementation to their
upstream positions.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 qemu-kvm.c             |    9 ---------
 qemu-kvm.h             |    2 --
 target-i386/kvm.c      |    9 +++++++++
 target-i386/kvm_i386.h |    1 +
 4 files changed, 10 insertions(+), 11 deletions(-)
diff mbox

Patch

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 8bc9857..8416a8d 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -37,15 +37,6 @@  static int kvm_old_assign_irq(KVMState *s,
     return kvm_vm_ioctl(s, KVM_ASSIGN_IRQ, assigned_irq);
 }
 
-int kvm_device_intx_set_mask(KVMState *s, uint32_t dev_id, bool masked)
-{
-    struct kvm_assigned_pci_dev assigned_dev;
-
-    assigned_dev.assigned_dev_id = dev_id;
-    assigned_dev.flags = masked ? KVM_DEV_ASSIGN_MASK_INTX : 0;
-    return kvm_vm_ioctl(s, KVM_ASSIGN_SET_INTX_MASK, &assigned_dev);
-}
-
 #ifdef KVM_CAP_ASSIGN_DEV_IRQ
 int kvm_assign_irq(KVMState *s, struct kvm_assigned_irq *assigned_irq)
 {
diff --git a/qemu-kvm.h b/qemu-kvm.h
index 1cdface..c247ad0 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -43,8 +43,6 @@ 
  */
 int kvm_assign_irq(KVMState *s, struct kvm_assigned_irq *assigned_irq);
 
-int kvm_device_intx_set_mask(KVMState *s, uint32_t dev_id, bool masked);
-
 struct kvm_irq_routing_entry;
 
 void kvm_add_routing_entry(KVMState *s, struct kvm_irq_routing_entry *entry);
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index e2041f4..4941744 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -2116,6 +2116,15 @@  int kvm_device_intx_assign(KVMState *s, uint32_t dev_id, bool use_host_msi,
     return kvm_assign_irq_internal(s, dev_id, irq_type, guest_irq);
 }
 
+int kvm_device_intx_set_mask(KVMState *s, uint32_t dev_id, bool masked)
+{
+    struct kvm_assigned_pci_dev assigned_dev;
+
+    assigned_dev.assigned_dev_id = dev_id;
+    assigned_dev.flags = masked ? KVM_DEV_ASSIGN_MASK_INTX : 0;
+    return kvm_vm_ioctl(s, KVM_ASSIGN_SET_INTX_MASK, &assigned_dev);
+}
+
 static int kvm_deassign_irq_internal(KVMState *s, uint32_t dev_id,
                                      uint32_t type)
 {
diff --git a/target-i386/kvm_i386.h b/target-i386/kvm_i386.h
index 5a24168..28f26bb 100644
--- a/target-i386/kvm_i386.h
+++ b/target-i386/kvm_i386.h
@@ -21,6 +21,7 @@  int kvm_device_pci_deassign(KVMState *s, uint32_t dev_id);
 
 int kvm_device_intx_assign(KVMState *s, uint32_t dev_id,
                            bool use_host_msi, uint32_t guest_irq);
+int kvm_device_intx_set_mask(KVMState *s, uint32_t dev_id, bool masked);
 int kvm_device_intx_deassign(KVMState *s, uint32_t dev_id, bool use_host_msi);
 
 int kvm_device_msi_deassign(KVMState *s, uint32_t dev_id);