Skip to contentSkip to conversation

vl.c: prohibit simultaneous use of -icount with kvm or xen

PATCH Applied Max Filippov 3 participants 4 messages Nov 10, 2011 – Aug 22, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
v1 -> v2 changes:
- cover both kvm and xen;
- add explanation text.

---
 vl.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
vl.c +5 -0
index f169aac..bb601e2 100644
@@ -3226,6 +3226,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) {
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 6 lines · Max Filippov

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.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 24 lines

---
v1 -> v2 changes:
- cover both kvm and xen;
- add explanation text.

---
  vl.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)
vl.c +5 -0
index f169aac..bb601e2 100644
@@ -3226,6 +3226,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) {
#2 lore raw
In reply to Max Filippov
Quoted 6 lines · Max Filippov

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.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 24 lines

---
v1 -> v2 changes:
- cover both kvm and xen;
- add explanation text.

---
  vl.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)
vl.c +5 -0
index f169aac..bb601e2 100644
@@ -3226,6 +3226,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) {
#3 lore raw

Am 11.11.2011 20:45, schrieb Anthony Liguori:

Quoted 9 lines · Max Filippov
Quoted 6 lines

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.

Applied. Thanks.

Applied to stable-0.15. Thanks,

Andreas

Quoted 28 lines

Regards,

Anthony Liguori

Quoted 24 lines

---
v1 -> v2 changes:
- cover both kvm and xen;
- add explanation text.

---
  vl.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)
vl.c +5 -0
index f169aac..bb601e2 100644
@@ -3226,6 +3226,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) {
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg