From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: Add missing emulation failure report in kvm_mmu_page_fault() Date: Mon, 18 Jan 2010 13:32:14 +0200 Message-ID: <4B5446BE.9070009@redhat.com> References: <1263545063-10285-1-git-send-email-sheng@linux.intel.com> <4B5303CF.2070508@redhat.com> <201001181732.25678.sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:64089 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753661Ab0ARLcS (ORCPT ); Mon, 18 Jan 2010 06:32:18 -0500 In-Reply-To: <201001181732.25678.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/18/2010 11:32 AM, Sheng Yang wrote: > On Sunday 17 January 2010 20:34:23 Avi Kivity wrote: > >> On 01/15/2010 10:44 AM, Sheng Yang wrote: >> >>> Currently we only have handle_invalid_guest_state() reported emulation >>> failure... >>> >> This is intentional - instead of spamming dmesg, we exit with an >> internal error. Modern qemu-kvm will halt and allow the user to inspect >> the guest with the built-in disassembler. >> >> > I think keep it there still useful for some users. And we have the same report > in handle_invalid_guest_state(), and we even have "emulation failure, check > dmesg for details" in QEmu when handling KVM_INTERNAL_ERROR_EMULATION. > > I think add one line here is the easiest way to keep consistence, and is > handy. > Another way to keep consistency is to remove emulation failure reporting in handle_invalid_guest_state() :) There are two problems with the kernel failure report. First, it doesn't report enough data - registers, surrounding instructions, etc. that are needed to explain what is going on. Second, it can flood dmesg, which is a pretty bad thing to do. I have a patch somewhere that adds instruction emulation bytes (both successful and failed) to ftrace. That may be useful, perhaps. -- error compiling committee.c: too many arguments to function