kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Glauber Costa <glommer@redhat.com>
Cc: kvm@vger.kernel.org, avi@redhat.com
Subject: Re: [PATCH 3/9] change order of kvm_init call.
Date: Sun, 26 Jul 2009 20:59:44 +0200	[thread overview]
Message-ID: <4A6CA7A0.8020901@web.de> (raw)
In-Reply-To: <1248131416-11272-4-git-send-email-glommer@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1530 bytes --]

Glauber Costa wrote:
> The goal is to get rid of the call to kvm_init. But those things
> are subtle, and often break. So do it in a separate patch, to help
> finding potential issues in future bisections.

Found such an issued: This patch triggers a segfault if no kvm modules
are loaded and you start qemu without -no-kvm. Please have a look.

Jan

> 
> Signed-off-by: Glauber Costa <glommer@redhat.com>
> ---
>  vl.c |   18 +++++++++---------
>  1 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/vl.c b/vl.c
> index f4e4d0f..86a6d70 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -5748,15 +5748,6 @@ int main(int argc, char **argv, char **envp)
>          signal(SIGTTIN, SIG_IGN);
>      }
>  
> -#ifdef CONFIG_KVM
> -    if (kvm_enabled()) {
> -	if (kvm_init(smp_cpus) < 0) {
> -	    fprintf(stderr, "Could not initialize KVM, will disable KVM support\n");
> -	    exit(1);
> -	}
> -    }
> -#endif
> -
>      if (pid_file && qemu_create_pidfile(pid_file) != 0) {
>          if (daemonize) {
>              uint8_t status = 1;
> @@ -5956,6 +5947,15 @@ int main(int argc, char **argv, char **envp)
>      }
>  #endif
>  
> +#ifdef CONFIG_KVM
> +    if (kvm_enabled()) {
> +	if (kvm_init(smp_cpus) < 0) {
> +	    fprintf(stderr, "Could not initialize KVM, will disable KVM support\n");
> +	    exit(1);
> +	}
> +    }
> +#endif
> +
>      if (monitor_device) {
>          monitor_hd = qemu_chr_open("monitor", monitor_device, NULL);
>          if (!monitor_hd) {



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  parent reply	other threads:[~2009-07-26 19:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-20 23:10 [PATCH 0/9] More integration with qemu.git Glauber Costa
2009-07-20 23:10 ` [PATCH 1/9] require --enable-kvm Glauber Costa
2009-07-20 23:10   ` [PATCH 2/9] embed kvm_create_context into kvm_init Glauber Costa
2009-07-20 23:10     ` [PATCH 3/9] change order of kvm_init call Glauber Costa
2009-07-20 23:10       ` [PATCH 4/9] use qemu version of kvm initialization Glauber Costa
2009-07-20 23:10         ` [PATCH 5/9] fold second pass " Glauber Costa
2009-07-20 23:10           ` [PATCH 6/9] remove kvm_in* functions Glauber Costa
2009-07-20 23:10             ` [PATCH 7/9] reuse env stop and stopped states Glauber Costa
2009-07-20 23:10               ` [PATCH 8/9] kvm_send_ipi Glauber Costa
2009-07-20 23:10                 ` [PATCH 9/9] remove kvm_abi variable Glauber Costa
2009-07-21  6:11             ` [PATCH 6/9] remove kvm_in* functions Gleb Natapov
2009-07-21 12:23               ` Glauber Costa
2009-07-21 12:18                 ` Gleb Natapov
2009-07-26 18:59       ` Jan Kiszka [this message]
2009-07-27 17:38         ` [PATCH 3/9] change order of kvm_init call Glauber Costa
2009-07-27 17:49           ` Anthony Liguori
2009-07-27 18:00             ` Glauber Costa
2009-07-27 18:10               ` Jan Kiszka
2009-07-27 18:20                 ` Glauber Costa
2009-07-27 18:28                   ` Daniel P. Berrange
2009-07-27 18:38                     ` Glauber Costa
2009-07-27 18:44                       ` Daniel P. Berrange
2009-07-27 19:55                         ` Glauber Costa
2009-07-27 18:34               ` Anthony Liguori

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=4A6CA7A0.8020901@web.de \
    --to=jan.kiszka@web.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 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).