From patchwork Fri May 13 12:14:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 782732 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4DCEJ7t032223 for ; Fri, 13 May 2011 12:14:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758912Ab1EMMOU (ORCPT ); Fri, 13 May 2011 08:14:20 -0400 Received: from thoth.sbs.de ([192.35.17.2]:15236 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753705Ab1EMMOR (ORCPT ); Fri, 13 May 2011 08:14:17 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id p4DCEBEr031676; Fri, 13 May 2011 14:14:11 +0200 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p4DCEAvC019933; Fri, 13 May 2011 14:14:11 +0200 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org Subject: [PATCH 07/16] qemu-kvm: Fold kvm_get_gsi_count into kvm_create_irqchip Date: Fri, 13 May 2011 14:14:01 +0200 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 13 May 2011 12:14:35 +0000 (UTC) Signed-off-by: Jan Kiszka --- qemu-kvm.c | 11 +---------- qemu-kvm.h | 11 ----------- 2 files changed, 1 insertions(+), 21 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 196c516..8b98ec8 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -217,7 +217,7 @@ static int kvm_init_irq_routing(kvm_context_t kvm) #ifdef KVM_CAP_IRQ_ROUTING int r, gsi_count; - gsi_count = kvm_get_gsi_count(kvm); + gsi_count = kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING); if (gsi_count > 0) { int gsi_bits, i; @@ -590,15 +590,6 @@ int kvm_has_gsi_routing(void) return r; } -int kvm_get_gsi_count(kvm_context_t kvm) -{ -#ifdef KVM_CAP_IRQ_ROUTING - return kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING); -#else - return -EINVAL; -#endif -} - int kvm_clear_gsi_routes(void) { #ifdef KVM_CAP_IRQ_ROUTING diff --git a/qemu-kvm.h b/qemu-kvm.h index 40d607b..693d554 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -306,17 +306,6 @@ int kvm_deassign_pci_device(kvm_context_t kvm, #endif /*! - * \brief Determines the number of gsis that can be routed - * - * Returns the number of distinct gsis that can be routed by kvm. This is - * also the number of distinct routes (if a gsi has two routes, than another - * gsi cannot be used...) - * - * \param kvm Pointer to the current kvm_context - */ -int kvm_get_gsi_count(kvm_context_t kvm); - -/*! * \brief Clears the temporary irq routing table * * Clears the temporary irq routing table. Nothing is committed to the