From patchwork Wed Nov 4 10:49:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 57509 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA4Ao4OI031538 for ; Wed, 4 Nov 2009 10:50:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755297AbZKDKtz (ORCPT ); Wed, 4 Nov 2009 05:49:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755287AbZKDKtz (ORCPT ); Wed, 4 Nov 2009 05:49:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23710 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755283AbZKDKtx (ORCPT ); Wed, 4 Nov 2009 05:49:53 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nA4AnwTn013000 for ; Wed, 4 Nov 2009 05:49:59 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nA4Anvje013172; Wed, 4 Nov 2009 05:49:58 -0500 Received: from localhost.localdomain (file.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 72B24250050; Wed, 4 Nov 2009 12:49:56 +0200 (IST) From: Avi Kivity To: Marcelo Tosatti Cc: Gleb Natapov , kvm@vger.kernel.org Subject: [PATCH QEMU-KVM 3/4] Report extra data on internal errors Date: Wed, 4 Nov 2009 12:49:55 +0200 Message-Id: <1257331796-29722-4-git-send-email-avi@redhat.com> In-Reply-To: <1257331796-29722-1-git-send-email-avi@redhat.com> References: <1257331796-29722-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/qemu-kvm.c b/qemu-kvm.c index 5568706..05caa1c 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -875,6 +875,16 @@ static int kvm_handle_internal_error(kvm_context_t kvm, { fprintf(stderr, "KVM internal error. Suberror: %d\n", run->internal.suberror); +#ifdef KVM_CAP_INTERNAL_ERROR_DATA + if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) { + int i; + + for (i = 0; i < run->internal.ndata; ++i) { + fprintf(stderr, "extra data[%d]: %"PRIx64"\n", + i, (uint64_t)run->internal.data[i]); + } + } +#endif kvm_show_regs(env); if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) fprintf(stderr, "emulation failure, check dmesg for details\n");