Drop unused functions, privatize those which are only used internally now. Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> --- kvm-stub.c | 10 ---------- kvm.h | 1 - qemu-kvm.c | 37 ++++++------------------------------- qemu-kvm.h | 39 --------------------------------------- 4 files changed, 6 insertions(+), 81 deletions(-) diff --git a/kvm-stub.c b/kvm-stub.c index acd1446..a4225e0 100644 --- a/kvm-stub.c +++ b/kvm-stub.c @@ -135,20 +135,10 @@ int kvm_has_gsi_routing(void) return 0; } -int kvm_get_irq_route_gsi(void) -{ - return -ENOSYS; -} - void kvm_msi_cache_invalidate(MSIRoutingCache *cache) { } -int kvm_commit_irq_routes(void) -{ - return -ENOSYS; -} - int kvm_set_irq(int irq, int level, int *status) { assert(0); diff --git a/kvm.h b/kvm.h index 61bcfec..9780e53 100644 --- a/kvm.h +++ b/kvm.h @@ -202,7 +202,6 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t adr, uint16_t val, bool assign); int kvm_has_gsi_routing(void); int kvm_allows_irq0_override(void); -int kvm_get_irq_route_gsi(void); void kvm_msi_cache_invalidate(MSIRoutingCache *cache); diff --git a/qemu-kvm.c b/qemu-kvm.c index c9b348c..34aebe5 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -188,12 +188,6 @@ int kvm_assign_pci_device(KVMState *s, return kvm_vm_ioctl(s, KVM_ASSIGN_PCI_DEVICE, assigned_dev); } -static int kvm_old_assign_irq(KVMState *s, - struct kvm_assigned_irq *assigned_irq) -{ - return kvm_vm_ioctl(s, KVM_ASSIGN_IRQ, assigned_irq); -} - int kvm_device_intx_assign(KVMState *s, uint32_t dev_id, uint32_t host_irq_type, uint32_t guest_irq) { @@ -210,25 +204,6 @@ int kvm_device_intx_assign(KVMState *s, uint32_t dev_id, return kvm_vm_ioctl(s, KVM_ASSIGN_IRQ, &assigned_irq); } } - -#ifdef KVM_CAP_ASSIGN_DEV_IRQ -int kvm_assign_irq(KVMState *s, struct kvm_assigned_irq *assigned_irq) -{ - int ret; - - ret = kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_ASSIGN_DEV_IRQ); - if (ret > 0) { - return kvm_vm_ioctl(s, KVM_ASSIGN_DEV_IRQ, assigned_irq); - } - - return kvm_old_assign_irq(s, assigned_irq); -} -#else -int kvm_assign_irq(KVMState *s, struct kvm_assigned_irq *assigned_irq) -{ - return kvm_old_assign_irq(s, assigned_irq); -} -#endif #endif int kvm_device_irq_deassign(KVMState *s, uint32_t dev_id, uint32_t type) @@ -275,8 +250,8 @@ int kvm_has_gsi_routing(void) return r; } -int kvm_add_routing_entry(struct kvm_irq_routing_entry *entry, - MSIRoutingCache *msi_cache) +static int kvm_add_routing_entry(struct kvm_irq_routing_entry *entry, + MSIRoutingCache *msi_cache) { #ifdef KVM_CAP_IRQ_ROUTING KVMState *s = kvm_state; @@ -328,7 +303,7 @@ int kvm_add_irq_route(int gsi, int irqchip, int pin) #endif } -int kvm_del_routing_entry(struct kvm_irq_routing_entry *entry) +static int kvm_del_routing_entry(struct kvm_irq_routing_entry *entry) { #ifdef KVM_CAP_IRQ_ROUTING KVMState *s = kvm_state; @@ -398,8 +373,8 @@ int kvm_del_routing_entry(struct kvm_irq_routing_entry *entry) #endif } -int kvm_update_routing_entry(struct kvm_irq_routing_entry *entry, - struct kvm_irq_routing_entry *newentry) +static int kvm_update_routing_entry(struct kvm_irq_routing_entry *entry, + struct kvm_irq_routing_entry *newentry) { #ifdef KVM_CAP_IRQ_ROUTING KVMState *s = kvm_state; @@ -456,7 +431,7 @@ int kvm_commit_irq_routes(void) static void kvm_msi_cache_flush(KVMState *s); -int kvm_get_irq_route_gsi(void) +static int kvm_get_irq_route_gsi(void) { KVMState *s = kvm_state; int i, bit; diff --git a/qemu-kvm.h b/qemu-kvm.h index 552b668..6b73ce1 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -139,17 +139,6 @@ int kvm_enable_vapic(CPUState *env, uint64_t vapic); int kvm_assign_pci_device(KVMState *s, struct kvm_assigned_pci_dev *assigned_dev); -/*! - * \brief Assign IRQ for an assigned device - * - * Used for PCI device assignment, this function assigns IRQ numbers for - * an physical device and guest IRQ handling. - * - * \param kvm Pointer to the current kvm_context - * \param assigned_irq Parameters, like dev id, host irq, guest irq, etc - */ -int kvm_assign_irq(KVMState *s, struct kvm_assigned_irq *assigned_irq); - int kvm_device_intx_assign(KVMState *s, uint32_t dev_id, uint32_t host_irq_type, uint32_t guest_irq); int kvm_device_msi_assign(KVMState *s, uint32_t dev_id, MSIMessage *msg, @@ -182,34 +171,6 @@ int kvm_deassign_pci_device(KVMState *s, */ int kvm_add_irq_route(int gsi, int irqchip, int pin); -struct kvm_irq_routing_entry; -/*! - * \brief Adds a routing entry to the temporary irq routing table - * - * Adds a filled routing entry to the temporary irq routing table. Nothing is - * committed to the running VM. - */ -int kvm_add_routing_entry(struct kvm_irq_routing_entry *entry, - MSIRoutingCache *msi_cache); - -/*! - * \brief Removes a routing from the temporary irq routing table - * - * Remove a routing to the temporary irq routing table. Nothing is - * committed to the running VM. - */ -int kvm_del_routing_entry(struct kvm_irq_routing_entry *entry); - -/*! - * \brief Updates a routing in the temporary irq routing table - * - * Update a routing in the temporary irq routing table - * with a new value. entry type and GSI can not be changed. - * Nothing is committed to the running VM. - */ -int kvm_update_routing_entry(struct kvm_irq_routing_entry *entry, - struct kvm_irq_routing_entry *newentry); - #else /* !CONFIG_KVM */ struct kvm_pit_state { -- 1.7.3.4 -- 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