Skip to contentSkip to conversation

monitor/qmp no longer working with -enable-kvm

Qemu-devel In review Gabriel L. Somlo 4 participants 4 messages Nov 1, 2012 – Nov 22, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Jan,

After my most recent pull from qemu git master, I realized I can no longer use '-monitor stdio' together with '-enable-kvm'. They each work separately, but when used together, qemu dies with the following error:

$ bin/qemu-system-x86_64 -enable-kvm -monitor stdio
failed to initialize KVM: Interrupted system call
No accelerator found!

I did a git bisect and the culprit appears to be
commit ac4119c023c72b15f54238af43e4a178fcf41494 (chardev: Use timer instead of bottom-half to postpone open event)

Thanks,
--Gabriel

#2 lore raw

PATCH 1/1 Reorder alarm timer setup again

From: Jan Kiszka <[email protected]>

ac4119c023 moved the alarm timer initialization to an earlier point but failed to consider that it depends on qemu_init_main_loop. Instead of moving the wrong things before os_daemonize, better push alarm timer right after qemu_init_main_loop and move the chardev initialization after this.

---
 vl.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)
vl.c +10 -7
index 5513d15..e27839a 100644
@@ -3551,15 +3551,8 @@ int main(int argc, char **argv, char **envp)
             add_device_config(DEV_VIRTCON, "vc:80Cx24C");
     }
 
-    if (init_timer_alarm() < 0) {
-        fprintf(stderr, "could not initialize alarm timer\n");
-        exit(1);
-    }
-
     socket_init();
 
-    if (qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_func, NULL, 1) != 0)
-        exit(1);
 #ifdef CONFIG_VIRTFS
     if (qemu_opts_foreach(qemu_find_opts("fsdev"), fsdev_init_func, NULL, 1) != 0) {
         exit(1);
@@ -3591,6 +3584,16 @@ int main(int argc, char **argv, char **envp)
         exit(1);
     }
 
+    if (init_timer_alarm() < 0) {
+        fprintf(stderr, "could not initialize alarm timer\n");
+        exit(1);
+    }
+
+    if (qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_func,
+                          NULL, 1) != 0) {
+        exit(1);
+    }
+
     machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0);
     if (machine_opts) {
         kernel_filename = qemu_opt_get(machine_opts, "kernel");
Signature · 1 line
1.7.3.4
#3 lore raw

Re: [Qemu-devel] [PATCH] Reorder alarm timer setup again

Quoted 7 lines · On Thu, 01 Nov 2012 17:25:24 +0100 Jan Kiszka <[email protected]> wrote:

From: Jan Kiszka <[email protected]>

ac4119c023 moved the alarm timer initialization to an earlier point but failed to consider that it depends on qemu_init_main_loop. Instead of moving the wrong things before os_daemonize, better push alarm timer right after qemu_init_main_loop and move the chardev initialization after this.

Jan, it seems that you have to rebase this patch.

#4 lore raw

Re: [Qemu-devel] [PATCH] Reorder alarm timer setup again

Quoted 5 lines · Luiz Capitulino
Quoted 2 lines · On Thu, 01 Nov 2012 17:25:24 +0100 Jan Kiszka <[email protected]> wrote:

From: Jan Kiszka <[email protected]>

Quoted 7 lines
Quoted 5 lines

ac4119c023 moved the alarm timer initialization to an earlier point but failed to consider that it depends on qemu_init_main_loop. Instead of moving the wrong things before os_daemonize, better push alarm timer right after qemu_init_main_loop and move the chardev initialization after this.

Jan, it seems that you have to rebase this patch.

This issue was fixed indirectly by an already merged changeset of Paolo
- IIRC now.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux