aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2011-11-10 15:38:42 +0400
committerAnthony Liguori <aliguori@us.ibm.com>2011-11-11 12:49:53 -0600
commit0abe905d29f556128c5fb2ea8d93e982e94aaa67 (patch)
treed08cb66376cbeb4f685cc03ad13d7af52c81141e /vl.c
parentee71c984342408a357a74f65915bf66484ba445a (diff)
vl.c: prohibit simultaneous use of -icount with kvm or xen
With -icount, The vm_clock is updated with help from TCG (it counts instructions at 2^ICOUNT ns/instructions). With KVM, the instruction count is not available so KVM cannot provide this help. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 16fa222f1a..f5afed4c49 100644
--- a/vl.c
+++ b/vl.c
@@ -3231,6 +3231,11 @@ int main(int argc, char **argv, char **envp)
fprintf(stderr, "could not initialize alarm timer\n");
exit(1);
}
+
+ if (icount_option && (kvm_enabled() || xen_enabled())) {
+ fprintf(stderr, "-icount is not allowed with kvm or xen\n");
+ exit(1);
+ }
configure_icount(icount_option);
if (net_init_clients() < 0) {