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