From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/5] KVM: x86 emulator: Use single stage decoding for Group 1 instructions Date: Tue, 22 Mar 2011 14:53:21 +0200 Message-ID: <4D889BC1.2010907@redhat.com> References: <20110314001524.f35e8a3f.takuya.yoshikawa@gmail.com> <20110314001727.89e302d7.takuya.yoshikawa@gmail.com> <20110314151140.GT10151@redhat.com> <20110315063232.6156395a.takuya.yoshikawa@gmail.com> <20110315093507.GU10151@redhat.com> <20110315230651.4ba2029c.takuya.yoshikawa@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , 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]:48149 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755888Ab1CVMx2 (ORCPT ); Tue, 22 Mar 2011 08:53:28 -0400 In-Reply-To: <20110315230651.4ba2029c.takuya.yoshikawa@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/15/2011 04:06 PM, Takuya Yoshikawa wrote: > > > So I just decided to treat CMPS and SCAS in another patch. > > > I mean I may introduce em_cmps or em_scas later if needed. > > > > > scas will likely just call em_cmp. > > > > > You prefer to treat these in this patch? > > > > > If there will be other patch for those instruction then it may be left > > as is. > > In my city, electric power supply may become restricted under control > from now, though only a few hours. So please take the patch series as > is if possible! I prefer to have the patchset fully updated, even if it takes a while. Good luck with the recovery! > > > > > > What is the difference of CMPS and SCAS? > > > > > > > > One compares to memory locations and another memory with AX register. > > I wanted to know whether we should introduce em_cmps() or em_scas() later. > > Probably we can eliminate introducing em_scas() because it should be > completely same as em_cmp(). I agree. > But em_cmps() will be needed for inserting > c->dst.type = OP_NONE; > before em_cmp(). I think we can put this line into em_cmp(). In fact, it looks like CMP r/m, reg will now write back the data into memory, which is wrong. So I recommend a first patch to add c->dst.type = OP_NONE before the cmp: label, so we have a fix patch followed by a refactoring patch. Later we can have a ReadOnly opcode table bit, so we can disable writeback from the opcode tables, not the code. -- error compiling committee.c: too many arguments to function