@@ -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;
@@ -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 {
@@ -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);
}
@@ -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"
@@ -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;