From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NpdyR-0002JV-B2 for qemu-devel@nongnu.org; Thu, 11 Mar 2010 03:42:31 -0500 Received: from [199.232.76.173] (port=55591 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpdyO-0002J6-K4 for qemu-devel@nongnu.org; Thu, 11 Mar 2010 03:42:28 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NpdyN-0003XZ-Vy for qemu-devel@nongnu.org; Thu, 11 Mar 2010 03:42:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56988) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NpdyN-0003XV-KH for qemu-devel@nongnu.org; Thu, 11 Mar 2010 03:42:27 -0500 Message-ID: <4B98ACF0.40702@redhat.com> Date: Thu, 11 Mar 2010 10:42:24 +0200 From: Avi Kivity MIME-Version: 1.0 References: <20100309015343.901738854@redhat.com> <20100309015644.207517219@redhat.com> In-Reply-To: <20100309015644.207517219@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [patch 2/3] kvm: handle internal error List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 03/09/2010 03:53 AM, Marcelo Tosatti wrote: > Port qemu-kvm's KVM_EXIT_INTERNAL_ERROR handling to upstream. > > Signed-off-by: Marcelo Tosatti > > Index: qemu-kvm/kvm-all.c > =================================================================== > --- qemu-kvm.orig/kvm-all.c > +++ qemu-kvm/kvm-all.c > @@ -721,6 +721,28 @@ static int kvm_handle_io(uint16_t port, > return 1; > } > > +#ifdef KVM_CAP_INTERNAL_ERROR_DATA > +static void kvm_handle_internal_error(CPUState *env, struct kvm_run *run) > +{ > + > + if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) { > + int i; > + > + fprintf(stderr, "KVM internal error. Suberror: %d\n", > + run->internal.suberror); > + > + for (i = 0; i< run->internal.ndata; ++i) { > + fprintf(stderr, "extra data[%d]: %"PRIx64"\n", > + i, (uint64_t)run->internal.data[i]); > + } > + } > + cpu_dump_state(env, stderr, fprintf, 0); > + if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) > + fprintf(stderr, "emulation failure\n"); > { braces } > + vm_stop(0); > +} > +#endif > Should trigger a qmp message to let management know something went wrong (can come later). -- error compiling committee.c: too many arguments to function