From: Jan Kiszka <jan.kiszka@siemens.com>
To: Alexander Graf <agraf@suse.de>
Cc: Glauber Costa <glommer@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"avi@redhat.com" <avi@redhat.com>
Subject: Re: [PATCH] exit if we fail to initialize kvm
Date: Wed, 29 Jul 2009 12:17:16 +0200 [thread overview]
Message-ID: <4A7021AC.80403@siemens.com> (raw)
In-Reply-To: <EE4DDC7C-6CBA-4A9E-8F4A-A193E9F8BBB7@suse.de>
Alexander Graf wrote:
>
> On 28.07.2009, at 23:28, Glauber Costa wrote:
>
>> On Tue, Jul 28, 2009 at 11:15:19PM +0200, Alexander Graf wrote:
>>>
>>> On 28.07.2009, at 22:52, Glauber Costa <glommer@redhat.com> wrote:
>>>
>>>> Falling back to tcg has proven to be evil through time. The option is
>>>> to
>>>> do not try to act behind user's back, and quit the program completely
>>>> if
>>>> we fail to initialize kvm. Right now, the only way to run tcg from our
>>>> tree
>>>> becomes explicitly asking for it, with the -no-kvm option.
>>>
>>> Well, actually there's one little difference: I tell the user to use -
>>> no-kvm if he really wants cpu emulation.
>>>
>>> But simply failing is probably good enough.
>> With my patch, we won't fail if the user asked -no-kvm, because then
>> we won't
>> even try to initialize kvm.
>>
>> We only exit here, if we try, but fail
>
> This is the patch as I had it in kvm-86. It's really only about being
> helpful to the user.
>
> Index: kvm-86/vl.c
> ===================================================================
> --- kvm-86.orig/vl.c
> +++ kvm-86/vl.c
> @@ -5836,7 +5836,8 @@ int main(int argc, char **argv, char **e
> #ifdef USE_KVM
> if (kvm_enabled()) {
> if (kvm_qemu_init() < 0) {
> - fprintf(stderr, "Could not initialize KVM, will disable KVM
> support\n");
> + fprintf(stderr, "Could not initialize KVM. Do you have kvm-amd
> or kvm-intel modprobe'd?\nIf you want to use CPU emulation, start with
> -no-kvm.\n");
> + exit(1);
> #ifdef NO_CPU_EMULATION
> fprintf(stderr, "Compiled with --disable-cpu-emulation,
> exiting.\n");
> exit(1);
Yes, that's a useful hint which should be included.
I just wonder now if/when qemu-kvm will switch over to the
kvm-by-default-off policy of upstream?
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2009-07-29 10:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-28 20:52 [PATCH] exit if we fail to initialize kvm Glauber Costa
2009-07-28 21:12 ` Alexander Graf
2009-07-28 21:15 ` Alexander Graf
2009-07-28 21:28 ` Glauber Costa
2009-07-28 21:38 ` Alexander Graf
2009-07-28 22:12 ` Alexander Graf
2009-07-29 10:17 ` Jan Kiszka [this message]
2009-07-29 11:49 ` Avi Kivity
2009-07-29 12:28 ` Alexander Graf
2009-07-29 12:47 ` Avi Kivity
2009-07-29 14:43 ` Jan Kiszka
2009-07-29 15:50 ` Glauber Costa
2009-07-29 15:52 ` Avi Kivity
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=4A7021AC.80403@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=agraf@suse.de \
--cc=avi@redhat.com \
--cc=glommer@redhat.com \
--cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.