From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 03/14] KVM: x86 emulator: move memop, memopp into emulation context Date: Wed, 14 Sep 2011 18:25:21 +0300 Message-ID: <4E70C761.4020201@redhat.com> References: <1315899951-2357-1-git-send-email-avi@redhat.com> <1315899951-2357-4-git-send-email-avi@redhat.com> <20110914194144.9d9946cf.yoshikawa.takuya@oss.ntt.co.jp> <4E7091F1.4040900@redhat.com> <20110915002144.feb1139e.takuya.yoshikawa@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Takuya Yoshikawa , Marcelo Tosatti , kvm@vger.kernel.org To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:7889 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755509Ab1INPZ0 (ORCPT ); Wed, 14 Sep 2011 11:25:26 -0400 In-Reply-To: <20110915002144.feb1139e.takuya.yoshikawa@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/14/2011 06:21 PM, Takuya Yoshikawa wrote: > > > > Nothing should be accessed from outside the emulator, except via > > accessors. We should move initialization to the emulator as well (or > > just initialize from x86_decode_insn() - any reason not to?) > > Not big reason but kvm_inject_realmode_interrupt() and kvm_task_switch() > call emulate_int_real() and emulator_task_switch() respectively without > doing generic decoding. > > So at least, we need some special initialization for them if we move > init_emulate_ctxt() into x86_decode_insn(). > Best if x86_decode_insn(), emulate_int_real(), and emulator_task_switch() all call an internal initialization function. This way the external caller doesn't have to worry about the details. -- error compiling committee.c: too many arguments to function