diff mbox

porting fixes regarding kvm-clock and lost irqs to stable qemu-kvm 0.12.4

Message ID 2AD2A9A0-A3E1-4AA5-A473-FFDD2F0DDDBF@dlh.net (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Lieven June 6, 2010, 4:50 p.m. UTC
None
diff mbox

Patch

diff -ur qemu-kvm-0.12.4.orig/qemu-kvm.c qemu-kvm-0.12.4/qemu-kvm.c
--- qemu-kvm-0.12.4.orig/qemu-kvm.c	2010-05-09 13:05:19.000000000 +0200
+++ qemu-kvm-0.12.4/qemu-kvm.c	2010-06-06 16:58:12.000000000 +0200
@@ -54,7 +54,7 @@ 
 int kvm_pit = 1;
 int kvm_pit_reinject = 1;
 int kvm_nested = 0;
-
+int kvm_clock = 1;
 
 KVMState *kvm_state;
 kvm_context_t kvm_context;
diff -ur qemu-kvm-0.12.4.orig/qemu-kvm.h qemu-kvm-0.12.4/qemu-kvm.h
--- qemu-kvm-0.12.4.orig/qemu-kvm.h	2010-05-09 13:05:19.000000000 +0200
+++ qemu-kvm-0.12.4/qemu-kvm.h	2010-06-06 17:04:02.000000000 +0200
@@ -1035,6 +1035,7 @@ 
 extern int kvm_pit;
 extern int kvm_pit_reinject;
 extern int kvm_nested;
+extern int kvm_clock;
 extern kvm_context_t kvm_context;
 
 struct ioperm_data {
diff -ur qemu-kvm-0.12.4.orig/qemu-kvm-x86.c qemu-kvm-0.12.4/qemu-kvm-x86.c
--- qemu-kvm-0.12.4.orig/qemu-kvm-x86.c	2010-05-09 13:05:19.000000000 +0200
+++ qemu-kvm-0.12.4/qemu-kvm-x86.c	2010-06-06 16:46:08.000000000 +0200
@@ -1259,6 +1259,7 @@ 
 	int i, features = 0;
 
 	for (i = 0; i < ARRAY_SIZE(para_features)-1; i++) {
+                if (para_features[i].cap == KVM_CAP_CLOCKSOURCE && !kvm_clock) continue;
 		if (kvm_check_extension(kvm_state, para_features[i].cap))
 			features |= (1 << para_features[i].feature);
 	}
diff -ur qemu-kvm-0.12.4.orig/qemu-options.hx qemu-kvm-0.12.4/qemu-options.hx
--- qemu-kvm-0.12.4.orig/qemu-options.hx	2010-05-09 13:05:19.000000000 +0200
+++ qemu-kvm-0.12.4/qemu-options.hx	2010-06-06 16:38:46.000000000 +0200
@@ -1959,6 +1959,9 @@ 
     "-no-kvm-pit     disable KVM kernel mode PIT\n")
 DEF("no-kvm-pit-reinjection", 0, QEMU_OPTION_no_kvm_pit_reinjection,
     "-no-kvm-pit-reinjection disable KVM kernel mode PIT interrupt reinjection\n")
+DEF("no-kvm-clock", 0, QEMU_OPTION_no_kvm_clock,
+    "-no-kvm-clock   disable KVM pvclock\n")
+
 #if defined(TARGET_I386) || defined(TARGET_X86_64) || defined(TARGET_IA64) || defined(__linux__)
 DEF("pcidevice", HAS_ARG, QEMU_OPTION_pcidevice,
     "-pcidevice host=bus:dev.func[,dma=none][,name=string]\n"
diff -ur qemu-kvm-0.12.4.orig/vl.c qemu-kvm-0.12.4/vl.c
--- qemu-kvm-0.12.4.orig/vl.c	2010-05-09 13:05:19.000000000 +0200
+++ qemu-kvm-0.12.4/vl.c	2010-06-06 17:05:53.000000000 +0200
@@ -5530,6 +5530,10 @@ 
                 kvm_pit_reinject = 0;
                 break;
             }
+            case QEMU_OPTION_no_kvm_clock: {
+                kvm_clock = 0;
+                break;
+            }
 	    case QEMU_OPTION_enable_nesting: {
 		kvm_nested = 1;
 		break;