From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 3/9] change order of kvm_init call. Date: Sun, 26 Jul 2009 20:59:44 +0200 Message-ID: <4A6CA7A0.8020901@web.de> References: <1248131416-11272-1-git-send-email-glommer@redhat.com> <1248131416-11272-2-git-send-email-glommer@redhat.com> <1248131416-11272-3-git-send-email-glommer@redhat.com> <1248131416-11272-4-git-send-email-glommer@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD6582FA779DCBB7E5D8D65D4" Cc: kvm@vger.kernel.org, avi@redhat.com To: Glauber Costa Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:59846 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751535AbZGZTBl (ORCPT ); Sun, 26 Jul 2009 15:01:41 -0400 In-Reply-To: <1248131416-11272-4-git-send-email-glommer@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD6582FA779DCBB7E5D8D65D4 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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 >=20 > Signed-off-by: Glauber Costa > --- > vl.c | 18 +++++++++--------- > 1 files changed, 9 insertions(+), 9 deletions(-) >=20 > 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); > } > =20 > -#ifdef CONFIG_KVM > - if (kvm_enabled()) { > - if (kvm_init(smp_cpus) < 0) { > - fprintf(stderr, "Could not initialize KVM, will disable KVM suppo= rt\n"); > - exit(1); > - } > - } > -#endif > - > if (pid_file && qemu_create_pidfile(pid_file) !=3D 0) { > if (daemonize) { > uint8_t status =3D 1; > @@ -5956,6 +5947,15 @@ int main(int argc, char **argv, char **envp) > } > #endif > =20 > +#ifdef CONFIG_KVM > + if (kvm_enabled()) { > + if (kvm_init(smp_cpus) < 0) { > + fprintf(stderr, "Could not initialize KVM, will disable KVM suppo= rt\n"); > + exit(1); > + } > + } > +#endif > + > if (monitor_device) { > monitor_hd =3D qemu_chr_open("monitor", monitor_device, NULL);= > if (!monitor_hd) { --------------enigD6582FA779DCBB7E5D8D65D4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkpsp6QACgkQniDOoMHTA+n6vACeOm1l7udHB/8SYMzO0n7gCRkp kCoAn1dPVXNqOXncTv+FGfkNS38wqiM2 =tmul -----END PGP SIGNATURE----- --------------enigD6582FA779DCBB7E5D8D65D4--