From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 4/4] KVM: x86 emulator: Make x86_decode_insn() return proper macros Date: Sun, 31 Jul 2011 11:48:40 +0300 Message-ID: <4E3516E8.9040100@redhat.com> References: <20110730175836.a119d816.takuya.yoshikawa@gmail.com> <20110730180334.2f50c753.takuya.yoshikawa@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11497 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280Ab1GaIsp (ORCPT ); Sun, 31 Jul 2011 04:48:45 -0400 In-Reply-To: <20110730180334.2f50c753.takuya.yoshikawa@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: 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. -- error compiling committee.c: too many arguments to function