[PATCH 16/19] qemu-kvm: Push PIT reinjection control into x86 code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>

This belongs where the in-kernel PIT is created.

Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
---
 qemu-kvm-x86.c |    8 ++++++++
 qemu-kvm.c     |    7 -------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 6b816bc..c0061a1 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -111,6 +111,14 @@ static int kvm_create_pit(kvm_context_t kvm)
             fprintf(stderr, "Create kernel PIC irqchip failed\n");
             return r;
         }
+        if (!kvm_pit_reinject) {
+            r = kvm_reinject_control(kvm_context, 0);
+            if (r < 0) {
+                fprintf(stderr,
+                        "failure to disable in-kernel PIT reinjection\n");
+                return r;
+            }
+        }
     }
 #endif
     return 0;
diff --git a/qemu-kvm.c b/qemu-kvm.c
index ecee3dc..bd595b1 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1405,13 +1405,6 @@ static int kvm_create_context(void)
 
     kvm_create_irqchip(kvm_context);
 
-    if (kvm_pit && !kvm_pit_reinject) {
-        if (kvm_reinject_control(kvm_context, 0)) {
-            fprintf(stderr, "failure to disable in-kernel PIT reinjection\n");
-            return -1;
-        }
-    }
-
     /* There was a nasty bug in < kvm-80 that prevents memory slots from being
      * destroyed properly.  Since we rely on this capability, refuse to work
      * with any kernel without this capability. */
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux