From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjGGv-00059P-EO for qemu-devel@nongnu.org; Tue, 19 Jul 2011 15:48:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjGGu-0006Ti-2J for qemu-devel@nongnu.org; Tue, 19 Jul 2011 15:48:01 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:52355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjGGt-0006TW-Fy for qemu-devel@nongnu.org; Tue, 19 Jul 2011 15:47:59 -0400 Message-ID: <4E25DF50.9030104@web.de> Date: Tue, 19 Jul 2011 21:47:28 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1311103418-29380-1-git-send-email-rjones@redhat.com> <1311103418-29380-2-git-send-email-rjones@redhat.com> In-Reply-To: <1311103418-29380-2-git-send-email-rjones@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig55BF0494F340B87748CE6781" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH] Remove debugging messages. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig55BF0494F340B87748CE6781 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2011-07-19 21:23, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" >=20 > When using qemu -machine accel=3Dkvm:tcg, if KVM is not available you > get a load of debugging output: >=20 > Could not access KVM kernel module: No such file or directory > failed to initialize KVM: No such file or directory > Back to tcg accelerator. >=20 > Signed-off-by: Richard W.M. Jones > --- > kvm-all.c | 1 - > vl.c | 14 -------------- > 2 files changed, 0 insertions(+), 15 deletions(-) >=20 > diff --git a/kvm-all.c b/kvm-all.c > index cbc2532..35d698b 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -713,7 +713,6 @@ int kvm_init(void) > s->vmfd =3D -1; > s->fd =3D qemu_open("/dev/kvm", O_RDWR); > if (s->fd =3D=3D -1) { > - fprintf(stderr, "Could not access KVM kernel module: %m\n"); > ret =3D -errno; > goto err; > } > diff --git a/vl.c b/vl.c > index fcd7395..83a08b6 100644 > --- a/vl.c > +++ b/vl.c > @@ -1922,7 +1922,6 @@ static int configure_accelerator(void) > char buf[10]; > int i, ret; > bool accel_initalised =3D 0; > - bool init_failed =3D 0; > =20 > QemuOptsList *list =3D qemu_find_opts("machine"); > if (!QTAILQ_EMPTY(&list->head)) { > @@ -1944,15 +1943,6 @@ static int configure_accelerator(void) > *(accel_list[i].allowed) =3D 1; > ret =3D accel_list[i].init(); > if (ret < 0) { > - init_failed =3D 1; > - if (!accel_list[i].available()) { > - printf("%s not supported for this target\n", > - accel_list[i].name); > - } else { > - fprintf(stderr, "failed to initialize %s: %s\n= ", > - accel_list[i].name, > - strerror(-ret)); > - } > *(accel_list[i].allowed) =3D 0; > } else { > accel_initalised =3D 1; > @@ -1970,10 +1960,6 @@ static int configure_accelerator(void) > exit(1); > } > =20 > - if (init_failed) { > - fprintf(stderr, "Back to %s accelerator.\n", accel_list[i].nam= e); > - } > - > return !accel_initalised; > } > =20 I agree the current situation is unfortunate. However, I think dumping some error information is useful when either no alternatives were specified or some verbose mode was selected. Maybe add an option "verbose=3Don|off" to -machine? Jan --------------enig55BF0494F340B87748CE6781 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.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4l31MACgkQitSsb3rl5xRIsACg1UPAW196touFyuw0TuTGBaww nkIAn0qFnG0zN9moeUUUk8kWRsR01aR2 =pRJ1 -----END PGP SIGNATURE----- --------------enig55BF0494F340B87748CE6781--