From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ram Pai Subject: kvm: emulation failure Date: Fri, 19 Jun 2009 12:23:40 -0700 Message-ID: <1245439420.6262.349.camel@localhost> Reply-To: linuxram@us.ibm.com Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Anthony Liguori To: kvm@vger.kernel.org Return-path: Received: from e31.co.us.ibm.com ([32.97.110.149]:60563 "EHLO e31.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575AbZFSTXw (ORCPT ); Fri, 19 Jun 2009 15:23:52 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e31.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n5JJJREk022807 for ; Fri, 19 Jun 2009 13:19:27 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5JJNs3Y252222 for ; Fri, 19 Jun 2009 13:23:54 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5JJNoCD005051 for ; Fri, 19 Jun 2009 13:23:54 -0600 Sender: kvm-owner@vger.kernel.org List-ID: I see this problem with a x86 sles10 guest running on x86_64 intel host. If the guest is reset abruptly and rebooted, some where before grub sequence it hangs and the following message is seen in the logs emulation failed (pagetable) rip 7ed5 66 60 ac 20. I located this instruction sequence in isolinux.bin on the iso ;if that is relevant. I did some analysis and find that there is an ept violation, which is handled and then the next instruction '66 60' is attempted to decode and emulate. But decode fails. kvm continues loops in the kernel in __vcpu_run(). the code path is kvm_run() -> __vcpu_run() -> vcpu_enter_guest() -> kvm_handle_exit() -> handle_ept_violation() -> kvm_mmu_page_fault() -> emulate_instruction() -> x86_decode_insn() Any insights here on how to fix the problem is appreciated. And if a fix already exists even better :) thanks, RP