All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: kvm@vger.kernel.org
Cc: avi@redhat.com, sheng@linux.intel.com,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 2/2] QEMU/KVM: provide an option to disable in-kernel PIT int reinjection
Date: Mon, 29 Dec 2008 15:42:35 -0200	[thread overview]
Message-ID: <20081229174406.160714089@localhost.localdomain> (raw)
In-Reply-To: 20081229174233.165653613@localhost.localdomain

[-- Attachment #1: kvm-pit-no-reinject --]
[-- Type: text/plain, Size: 2622 bytes --]

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

Index: kvm-userspace.pit/qemu/qemu-kvm.c
===================================================================
--- kvm-userspace.pit.orig/qemu/qemu-kvm.c
+++ kvm-userspace.pit/qemu/qemu-kvm.c
@@ -11,6 +11,7 @@
 int kvm_allowed = 1;
 int kvm_irqchip = 1;
 int kvm_pit = 1;
+int kvm_pit_no_reinject = 0;
 int kvm_nested = 0;
 
 #include <assert.h>
@@ -795,6 +796,12 @@ int kvm_qemu_create_context(void)
     r = kvm_arch_qemu_create_context();
     if(r <0)
 	kvm_qemu_destroy();
+    if (kvm_pit_no_reinject) {
+        if (kvm_pit_no_reinjection(kvm_context)) {
+            fprintf(stderr, "failure to disable in-kernel PIT reinjection\n");
+            return -1;
+        }
+    }
 #ifdef TARGET_I386
     destroy_region_works = kvm_destroy_memory_region_works(kvm_context);
 #endif
Index: kvm-userspace.pit/qemu/vl.c
===================================================================
--- kvm-userspace.pit.orig/qemu/vl.c
+++ kvm-userspace.pit/qemu/vl.c
@@ -4071,6 +4071,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"
+	   "-kvm-pit-no-reinject disable KVM kernel mode PIT interrupt reinjection\n"
 	   "-enable-nesting enable support for running a VM inside the VM (AMD only)\n"
 #if defined(TARGET_I386) || defined(TARGET_X86_64) || defined(TARGET_IA64) || defined(__linux__)
            "-pcidevice host=bus:dev.func[,dma=none][,name=string]\n"
@@ -4202,6 +4203,7 @@ enum {
     QEMU_OPTION_no_kvm,
     QEMU_OPTION_no_kvm_irqchip,
     QEMU_OPTION_no_kvm_pit,
+    QEMU_OPTION_kvm_pit_no_reinject,
 #if defined(TARGET_I386) || defined(TARGET_X86_64) || defined(TARGET_IA64) || defined(__linux__)
     QEMU_OPTION_pcidevice,
 #endif
@@ -4298,6 +4300,7 @@ static const QEMUOption qemu_options[] =
 #endif
     { "no-kvm-irqchip", 0, QEMU_OPTION_no_kvm_irqchip },
     { "no-kvm-pit", 0, QEMU_OPTION_no_kvm_pit },
+    { "kvm-pit-no-reinject", 0, QEMU_OPTION_kvm_pit_no_reinject },
     { "enable-nesting", 0, QEMU_OPTION_enable_nesting },
 #if defined(TARGET_I386) || defined(TARGET_X86_64) || defined(TARGET_IA64) || defined(__linux__)
     { "pcidevice", HAS_ARG, QEMU_OPTION_pcidevice },
@@ -5267,6 +5270,11 @@ int main(int argc, char **argv, char **e
 		kvm_pit = 0;
 		break;
 	    }
+            case QEMU_OPTION_kvm_pit_no_reinject: {
+                extern int kvm_pit_no_reinject;
+                kvm_pit_no_reinject = 1;
+                break;
+            }
 	    case QEMU_OPTION_enable_nesting: {
 		kvm_nested = 1;
 		break;

-- 


  parent reply	other threads:[~2008-12-29 17:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29 17:42 [patch 0/2] QEMU/KVM: PIT no interrupt reinjection support Marcelo Tosatti
2008-12-29 17:42 ` [patch 1/2] libkvm: pit not reinject support Marcelo Tosatti
2008-12-30 10:09   ` Avi Kivity
2008-12-29 17:42 ` Marcelo Tosatti [this message]
2008-12-30  3:28   ` [patch 2/2] QEMU/KVM: provide an option to disable in-kernel PIT int reinjection Sheng Yang
2008-12-30 10:10   ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2008-12-30 17:48 [patch 0/2] QEMU/KVM: PIT interrupt reinjection control support (v2) Marcelo Tosatti
2008-12-30 17:48 ` [patch 2/2] QEMU/KVM: provide an option to disable in-kernel PIT int reinjection Marcelo Tosatti

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=20081229174406.160714089@localhost.localdomain \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=sheng@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.