qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bruce Rogers <brogers@suse.com>
To: qemu-devel@nongnu.org
Cc: Bruce Rogers <brogers@suse.com>
Subject: [Qemu-devel] [PATCH v2] handle device help before accelerator set up
Date: Thu,  9 Aug 2012 12:47:40 -0600	[thread overview]
Message-ID: <1344538060-25948-1-git-send-email-brogers@suse.com> (raw)

A command line device probe using just -device "?" gets processed
after qemu-kvm initializes the accelerator. If /dev/kvm is not
present, the accelerator check will fail (kvm is defaulted to on),
which causes libvirt to not be set up to handle qemu guests.

Moving the device help handling before the accelerator set up allows
the device probe to work in this configuration and libvirt succeeds
in setting up for a qemu hypervisor mode.

Signed-off-by: Bruce Rogers <brogers@suse.com>
---
 vl.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/vl.c b/vl.c
index e71cb30..a4a520f 100644
--- a/vl.c
+++ b/vl.c
@@ -3345,6 +3345,11 @@ int main(int argc, char **argv, char **envp)
         ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
     }
 
+    if (qemu_opts_foreach(qemu_find_opts("device"), device_help_func, NULL, 0)
+        != 0) {
+        exit(0);
+    }
+
     configure_accelerator();
 
     qemu_init_cpu_loop();
@@ -3500,9 +3505,6 @@ int main(int argc, char **argv, char **envp)
     }
     select_vgahw(vga_model);
 
-    if (qemu_opts_foreach(qemu_find_opts("device"), device_help_func, NULL, 0) != 0)
-        exit(0);
-
     if (watchdog) {
         i = select_watchdog(watchdog);
         if (i > 0)
-- 
1.7.7

             reply	other threads:[~2012-08-09 18:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 18:47 Bruce Rogers [this message]
2012-08-09 20:00 ` [Qemu-devel] [PATCH v2] handle device help before accelerator set up Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344538060-25948-1-git-send-email-brogers@suse.com \
    --to=brogers@suse.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).