From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjGXG-00017v-ET for qemu-devel@nongnu.org; Tue, 19 Jul 2011 16:04:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjGXE-0000DK-SP for qemu-devel@nongnu.org; Tue, 19 Jul 2011 16:04:54 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:32893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjGXE-0000DE-80 for qemu-devel@nongnu.org; Tue, 19 Jul 2011 16:04:52 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e38.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p6JCRqOf005551 for ; Tue, 19 Jul 2011 06:27:52 -0600 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p6JK4jBP118638 for ; Tue, 19 Jul 2011 14:04:46 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p6JE4Nkv008337 for ; Tue, 19 Jul 2011 08:04:23 -0600 Message-ID: <4E25E346.30908@us.ibm.com> Date: Tue, 19 Jul 2011 15:04:22 -0500 From: Anthony Liguori 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: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: qemu-devel@nongnu.org On 07/19/2011 02:23 PM, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > When using qemu -machine accel=kvm:tcg, if KVM is not available you > get a load of debugging output: > > Could not access KVM kernel module: No such file or directory > failed to initialize KVM: No such file or directory > Back to tcg accelerator. If you ask for kvm, and it can't be initialized, then shouldn't we alert the user about this? Regards, Anthony Liguori > > Signed-off-by: Richard W.M. Jones > --- > kvm-all.c | 1 - > vl.c | 14 -------------- > 2 files changed, 0 insertions(+), 15 deletions(-) > > 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 = -1; > s->fd = qemu_open("/dev/kvm", O_RDWR); > if (s->fd == -1) { > - fprintf(stderr, "Could not access KVM kernel module: %m\n"); > ret = -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 = 0; > - bool init_failed = 0; > > QemuOptsList *list = qemu_find_opts("machine"); > if (!QTAILQ_EMPTY(&list->head)) { > @@ -1944,15 +1943,6 @@ static int configure_accelerator(void) > *(accel_list[i].allowed) = 1; > ret = accel_list[i].init(); > if (ret< 0) { > - init_failed = 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) = 0; > } else { > accel_initalised = 1; > @@ -1970,10 +1960,6 @@ static int configure_accelerator(void) > exit(1); > } > > - if (init_failed) { > - fprintf(stderr, "Back to %s accelerator.\n", accel_list[i].name); > - } > - > return !accel_initalised; > } >