Patchwork vl.c: prohibit simultaneous use of -icount and kvm

login
register
mail settings
Submitter Max Filippov
Date Nov. 10, 2011, 10:19 a.m.
Message ID <1320920380-3386-1-git-send-email-jcmvbkbc@gmail.com>
Download mbox | patch
Permalink /patch/124840/
State New
Headers show

Comments

Max Filippov - Nov. 10, 2011, 10:19 a.m.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 vl.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

Patch

diff --git a/vl.c b/vl.c
index f169aac..cac665e 100644
--- a/vl.c
+++ b/vl.c
@@ -3226,7 +3226,13 @@  int main(int argc, char **argv, char **envp)
         fprintf(stderr, "could not initialize alarm timer\n");
         exit(1);
     }
-    configure_icount(icount_option);
+
+    if (icount_option && kvm_enabled()) {
+        fprintf(stderr, "-icount is not allowed with kvm acceleration\n");
+        exit(1);
+    } else {
+        configure_icount(icount_option);
+    }
 
     if (net_init_clients() < 0) {
         exit(1);