From patchwork Thu Aug 20 14:05:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammed Gamal X-Patchwork-Id: 42941 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 n7KE6F74019467 for ; Thu, 20 Aug 2009 14:06:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754382AbZHTOGL (ORCPT ); Thu, 20 Aug 2009 10:06:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754412AbZHTOGK (ORCPT ); Thu, 20 Aug 2009 10:06:10 -0400 Received: from mail-ew0-f207.google.com ([209.85.219.207]:62620 "EHLO mail-ew0-f207.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754249AbZHTOGJ (ORCPT ); Thu, 20 Aug 2009 10:06:09 -0400 Received: by mail-ew0-f207.google.com with SMTP id 3so2904772ewy.18 for ; Thu, 20 Aug 2009 07:06:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=rWNQ6fDmGJ29cczItoKHK/hFX4VTxZWSb8x+mMQU+SA=; b=MMa137OcN5VAQh4Vu7I5enUOrHRRRM2SaRag1pDl++poOrvt4XUoTLKT/IkHd/0y65 x73Ovbc3USMj5f3Wxb0QWngxmHGDz26MPkWaeFsLrm3l8rdSVyRk1xojClR9uhIkAJCA yoYiP7QFt/UwU4j8O7WuEwvYN5wSdHphFhntc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=X3Ba+C69EXgs3Dpaa4IKwBx2QUguJN6zJ27sWpwrlcBktPoVj947WBKeL40A7K4umx kkiug5dDwBO2Mlixt4IqLKHHkVBdpN+4D18C/05mu6MgyiF0Jib/8+vQgOaee3QPLmrH 76WT7rPBA8sRBw7Qkdo2dK2JFWqghqYKN5PGA= Received: by 10.210.37.4 with SMTP id k4mr122823ebk.4.1250777171271; Thu, 20 Aug 2009 07:06:11 -0700 (PDT) Received: from localhost.localdomain ([188.49.63.254]) by mx.google.com with ESMTPS id 5sm214155eyf.38.2009.08.20.07.06.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 20 Aug 2009 07:06:10 -0700 (PDT) From: Mohammed Gamal To: avi@redhat.com Cc: kvm@vger.kernel.org, Mohammed Gamal Subject: [PATCH][RESEND] x86 emulator: Report unhandled instructions Date: Thu, 20 Aug 2009 17:05:36 +0300 Message-Id: <1250777137-22886-3-git-send-email-m.gamal005@gmail.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1250777137-22886-2-git-send-email-m.gamal005@gmail.com> References: <1250777137-22886-1-git-send-email-m.gamal005@gmail.com> <1250777137-22886-2-git-send-email-m.gamal005@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Report unhandled instructions in the syslog on emulation failure Signed-off-by: Mohammed Gamal --- arch/x86/kvm/emulate.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index cc0fe39..52a4b7d 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2194,6 +2194,7 @@ writeback: done: if (rc == X86EMUL_UNHANDLEABLE) { + kvm_report_emulation_failure(ctxt->vcpu, "unhandled instruction"); c->eip = saved_eip; return -1; } @@ -2467,7 +2468,7 @@ twobyte_insn: goto writeback; cannot_emulate: - DPRINTF("Cannot emulate %02x\n", c->b); + kvm_report_emulation_failure(ctxt->vcpu, "unhandled instruction"); c->eip = saved_eip; return -1; }