From patchwork Mon Jun 22 13:22:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 31751 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5MDN4K4029674 for ; Mon, 22 Jun 2009 13:23:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbZFVNWt (ORCPT ); Mon, 22 Jun 2009 09:22:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751780AbZFVNWt (ORCPT ); Mon, 22 Jun 2009 09:22:49 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:54322 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751850AbZFVNWt (ORCPT ); Mon, 22 Jun 2009 09:22:49 -0400 Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MIjU4-0003xa-84 for kvm@vger.kernel.org; Mon, 22 Jun 2009 13:22:52 +0000 Date: Mon, 22 Jun 2009 09:22:52 -0400 From: Christoph Hellwig To: kvm@vger.kernel.org Subject: [PATCH] qemu-kvm: kill kvm_disable_irqchip_creation and kvm_disable_pit_creation wrappers Message-ID: <20090622132252.GA11227@infradead.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Just set the flags directly. --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: qemu-kvm/libkvm-all.h =================================================================== --- qemu-kvm.orig/libkvm-all.h 2009-06-22 15:18:26.938929243 +0200 +++ qemu-kvm/libkvm-all.h 2009-06-22 15:19:20.813804809 +0200 @@ -192,26 +192,6 @@ kvm_context_t kvm_init(struct kvm_callba void kvm_finalize(kvm_context_t kvm); /*! - * \brief Disable the in-kernel IRQCHIP creation - * - * In-kernel irqchip is enabled by default. If userspace irqchip is to be used, - * this should be called prior to kvm_create(). - * - * \param kvm Pointer to the kvm_context - */ -void kvm_disable_irqchip_creation(kvm_context_t kvm); - -/*! - * \brief Disable the in-kernel PIT creation - * - * In-kernel pit is enabled by default. If userspace pit is to be used, - * this should be called prior to kvm_create(). - * - * \param kvm Pointer to the kvm_context - */ -void kvm_disable_pit_creation(kvm_context_t kvm); - -/*! * \brief Create new virtual machine * * This creates a new virtual machine, maps physical RAM to it, and creates a Index: qemu-kvm/qemu-kvm.c =================================================================== --- qemu-kvm.orig/qemu-kvm.c 2009-06-22 15:18:26.940930684 +0200 +++ qemu-kvm/qemu-kvm.c 2009-06-22 15:19:20.814805356 +0200 @@ -392,16 +392,6 @@ void kvm_finalize(kvm_context_t kvm) free(kvm); } -void kvm_disable_irqchip_creation(kvm_context_t kvm) -{ - kvm->no_irqchip_creation = 1; -} - -void kvm_disable_pit_creation(kvm_context_t kvm) -{ - kvm->no_pit_creation = 1; -} - kvm_vcpu_context_t kvm_create_vcpu(kvm_context_t kvm, int id) { long mmap_size; @@ -2338,10 +2328,10 @@ int kvm_qemu_create_context(void) int r; if (!kvm_irqchip) { - kvm_disable_irqchip_creation(kvm_context); + kvm_context->no_irqchip_creation = 1; } if (!kvm_pit) { - kvm_disable_pit_creation(kvm_context); + kvm_context->no_pit_creation = 1; } if (kvm_create(kvm_context, 0, NULL) < 0) { kvm_qemu_destroy();