From: Christoph Hellwig Subject: [PATCH] qemu-kvm: kill kvm_disable_irqchip_creation and kvm_disable_pit_creation wrappers Date: Mon, 22 Jun 2009 09:22:52 -0400 Message-ID: <20090622132252.GA11227@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: kvm@vger.kernel.org Return-path: 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 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Just set the flags directly. 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();