public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: Chris Wright <chrisw@redhat.com>,
	Glauber Costa <gcosta@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 10/12] QEMU/KVM: add option to disable in-kernel pmtimer emulation
Date: Thu, 29 May 2008 19:22:59 -0300	[thread overview]
Message-ID: <20080529222829.168192032@localhost.localdomain> (raw)
In-Reply-To: 20080529222249.563011248@localhost.localdomain

[-- Attachment #1: disable-inkernel-acpi-timer --]
[-- Type: text/plain, Size: 2908 bytes --]

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: kvm-userspace.realtip/qemu/qemu-kvm.c
===================================================================
--- kvm-userspace.realtip.orig/qemu/qemu-kvm.c
+++ kvm-userspace.realtip/qemu/qemu-kvm.c
@@ -11,6 +11,7 @@
 int kvm_allowed = 1;
 int kvm_irqchip = 1;
 int kvm_pit = 1;
+int kvm_acpi_timer = 1;
 
 #include <assert.h>
 #include <string.h>
@@ -670,6 +671,9 @@ int kvm_qemu_create_context(void)
     if (!kvm_pit) {
         kvm_disable_pit_creation(kvm_context);
     }
+    if (!kvm_acpi_timer) {
+        kvm_disable_acpi_timer_creation(kvm_context);
+    }
     if (kvm_create(kvm_context, phys_ram_size, (void**)&phys_ram_base) < 0) {
 	kvm_qemu_destroy();
 	return -1;
Index: kvm-userspace.realtip/qemu/qemu-kvm.h
===================================================================
--- kvm-userspace.realtip.orig/qemu/qemu-kvm.h
+++ kvm-userspace.realtip/qemu/qemu-kvm.h
@@ -111,10 +111,12 @@ extern kvm_context_t kvm_context;
 #define kvm_enabled() (kvm_allowed)
 #define qemu_kvm_irqchip_in_kernel() kvm_irqchip_in_kernel(kvm_context)
 #define qemu_kvm_pit_in_kernel() kvm_pit_in_kernel(kvm_context)
+#define qemu_kvm_acpi_timer_in_kernel() kvm_acpi_timer_in_kernel(kvm_context)
 #else
 #define kvm_enabled() (0)
 #define qemu_kvm_irqchip_in_kernel() (0)
 #define qemu_kvm_pit_in_kernel() (0)
+#define qemu_kvm_acpi_timer_in_kernel() (0)
 #endif
 
 void kvm_mutex_unlock(void);
Index: kvm-userspace.realtip/qemu/vl.c
===================================================================
--- kvm-userspace.realtip.orig/qemu/vl.c
+++ kvm-userspace.realtip/qemu/vl.c
@@ -7792,6 +7792,7 @@ static void help(int exitcode)
 #endif
 	   "-no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC\n"
 	   "-no-kvm-pit	    disable KVM kernel mode PIT\n"
+	   "-no-kvm-acpi-timer	    disable KVM kernel mode ACPI timer\n"
 #endif
 #ifdef TARGET_I386
            "-std-vga        simulate a standard VGA card with VESA Bochs Extensions\n"
@@ -7916,6 +7917,7 @@ enum {
     QEMU_OPTION_no_kvm,
     QEMU_OPTION_no_kvm_irqchip,
     QEMU_OPTION_no_kvm_pit,
+    QEMU_OPTION_no_kvm_acpi_timer,
     QEMU_OPTION_no_reboot,
     QEMU_OPTION_no_shutdown,
     QEMU_OPTION_show_cursor,
@@ -8005,6 +8007,7 @@ const QEMUOption qemu_options[] = {
 #endif
     { "no-kvm-irqchip", 0, QEMU_OPTION_no_kvm_irqchip },
     { "no-kvm-pit", 0, QEMU_OPTION_no_kvm_pit },
+    { "no-kvm-acpi-timer", 0, QEMU_OPTION_no_kvm_acpi_timer },
 #endif
 #if defined(TARGET_PPC) || defined(TARGET_SPARC)
     { "g", 1, QEMU_OPTION_g },
@@ -8908,6 +8911,11 @@ int main(int argc, char **argv)
 		kvm_pit = 0;
 		break;
 	    }
+            case QEMU_OPTION_no_kvm_acpi_timer: {
+                extern int kvm_acpi_timer;
+                kvm_acpi_timer = 0;
+                break;
+            }
 #endif
             case QEMU_OPTION_usb:
                 usb_enabled = 1;

-- 


  parent reply	other threads:[~2008-05-29 22:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29 22:22 [patch 00/12] fake ACPI C2 emulation v2 Marcelo Tosatti
2008-05-29 22:22 ` [patch 01/12] expose ACPI pmtimer to userspace (/dev/pmtimer) Marcelo Tosatti
2008-06-01 16:34   ` Thomas Gleixner
2008-06-01 16:56     ` Anthony Liguori
2008-06-04  9:53       ` Avi Kivity
2008-06-04 10:01         ` Thomas Gleixner
2008-06-04 10:35           ` Avi Kivity
2008-06-01 17:56     ` Marcelo Tosatti
2008-06-01 18:17       ` Thomas Gleixner
2008-06-02 16:43       ` John Stultz
2008-06-03  4:09         ` Marcelo Tosatti
2008-05-29 22:22 ` [patch 02/12] KVM: allow multiple IO bitmap pages, provide userspace interface Marcelo Tosatti
2008-05-29 22:22 ` [patch 03/12] KVM: allow userspace to open access to ACPI pmtimer Marcelo Tosatti
2008-05-29 22:22 ` [patch 04/12] KVM: move muldiv64 to x86.c, export Marcelo Tosatti
2008-05-29 22:22 ` [patch 05/12] KVM: in-kernel ACPI timer emulation Marcelo Tosatti
2008-05-29 22:22 ` [patch 06/12] QEMU/KVM: self-disabling C2 emulation Marcelo Tosatti
2008-05-29 22:22 ` [patch 07/12] libkvm: interface to KVM_SET_OPEN_IOPORT Marcelo Tosatti
2008-05-29 22:22 ` [patch 08/12] QEMU/KVM: non-virtualized ACPI PMTimer support Marcelo Tosatti
2008-05-29 22:22 ` [patch 09/12] libkvm: in-kernel ACPI pmtimer interface Marcelo Tosatti
2008-05-29 22:22 ` Marcelo Tosatti [this message]
2008-05-29 22:23 ` [patch 11/12] libkvm: interface for pmtimer save/restore Marcelo Tosatti
2008-05-29 22:23 ` [patch 12/12] QEMU/KVM: in-kernel pmtimer save/restore support Marcelo Tosatti
2008-06-01  9:21 ` [patch 00/12] fake ACPI C2 emulation v2 Avi Kivity
2008-06-02 16:08   ` Marcelo Tosatti
2008-06-04 10:49     ` Avi Kivity
2008-06-05  3:12       ` Marcelo Tosatti
2008-06-05  7:56         ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080529222829.168192032@localhost.localdomain \
    --to=mtosatti@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@qumranet.com \
    --cc=chrisw@redhat.com \
    --cc=gcosta@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox