diff mbox

qemu-kvm: kill kvm_disable_irqchip_creation and kvm_disable_pit_creation wrappers

Message ID 20090622132252.GA11227@infradead.org (mailing list archive)
State New, archived
Headers show

Commit Message

Christoph Hellwig June 22, 2009, 1:22 p.m. UTC
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
diff mbox

Patch

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();