Signed-off-by: Marcelo Tosatti <mtosa...@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;
-- -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html