From patchwork Wed Aug 19 23:45:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammed Gamal X-Patchwork-Id: 42803 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 n7JNl76B032699 for ; Wed, 19 Aug 2009 23:47:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754152AbZHSXp2 (ORCPT ); Wed, 19 Aug 2009 19:45:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754197AbZHSXpZ (ORCPT ); Wed, 19 Aug 2009 19:45:25 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]:39106 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752639AbZHSXpY (ORCPT ); Wed, 19 Aug 2009 19:45:24 -0400 Received: by fg-out-1718.google.com with SMTP id e21so1151575fga.17 for ; Wed, 19 Aug 2009 16:45:24 -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; bh=rWNQ6fDmGJ29cczItoKHK/hFX4VTxZWSb8x+mMQU+SA=; b=ZQLJS2NwbAKqU7s/GHsx0F3irzegT6LFAZ3bMOYjWICr6JSYfHGKOKoyeA7unWei+d mIhA6TFmBejgPZ/JZOoaBure0fJvh++clLb1MQ6CUjG5nw+LdKnrgLiJaPfKS4U4LnOb jq2BhTh8NFrldZmYptPsk6E95bQAk/OD/VeA0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=a/HP6X1oro05cFUeJcVxFJko/nbgTfhGHB37bE0s/qJZHM1ArVpX6SCrX+EWr5PQvP uMAK7EDcg9olQMc17qT0h2zYSeEB05s7LOyY0xZSiH+xhPz+2P8NzJHxrUYbmgAuZ834 J/CrVKdjGljbKlqjjMSlqyDyHd002mF8EqnEw= Received: by 10.86.13.7 with SMTP id 7mr4629595fgm.64.1250725524435; Wed, 19 Aug 2009 16:45:24 -0700 (PDT) Received: from localhost.localdomain ([188.52.15.213]) by mx.google.com with ESMTPS id 3sm1602534fge.0.2009.08.19.16.45.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 Aug 2009 16:45:24 -0700 (PDT) From: Mohammed Gamal To: avi@redhat.com Cc: kvm@vger.kernel.org, Mohammed Gamal Subject: [PATCH] x86 emulator: Report unhandlead instructions Date: Thu, 20 Aug 2009 02:45:02 +0300 Message-Id: <1250725502-19777-1-git-send-email-m.gamal005@gmail.com> X-Mailer: git-send-email 1.6.0.4 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; }