From: Takuya Yoshikawa Subject: Re: [PATCH 4/4] KVM: x86 emulator: Make x86_decode_insn() return proper macros Date: Sun, 31 Jul 2011 22:48:54 +0900 Message-ID: <20110731224854.e3ab5f0a.takuya.yoshikawa@gmail.com> References: <20110730175836.a119d816.takuya.yoshikawa@gmail.com> <20110730180334.2f50c753.takuya.yoshikawa@gmail.com> <4E3516E8.9040100@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp To: Avi Kivity Return-path: Received: from mail-iy0-f174.google.com ([209.85.210.174]:51265 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751583Ab1GaNtA (ORCPT ); Sun, 31 Jul 2011 09:49:00 -0400 Received: by iyb12 with SMTP id 12so5823150iyb.19 for ; Sun, 31 Jul 2011 06:48:59 -0700 (PDT) In-Reply-To: <4E3516E8.9040100@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 31 Jul 2011 11:48:40 +0300 Avi Kivity wrote: > On 07/30/2011 12:03 PM, Takuya Yoshikawa wrote: > > From: Takuya Yoshikawa > > > > Return EMULATION_OK/FAILED consistently. Also treat instruction fetch > > errors, not restricted to X86EMUL_UNHANDLEABLE, as EMULATION_FAILED; > > although this cannot happen in practice, the current logic will continue > > the emulation even if the decoder fails to fetch the instruction. > > In fact it can happen in practice, but not through normal usage. For > example, one vcpu can execute an instruction which traps into the > emulator, while another vcpu changes the page tables to make the > instruction unfetchable. > Really virtualization specific! I need to think about multiple vcpus more. Thanks, Takuya -- Takuya Yoshikawa