From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC PATCH 2/2] KVM: x86 emulator: Cleanup emulate_push() writebacks Date: Sun, 03 Apr 2011 19:04:15 +0300 Message-ID: <4D989A7F.8000700@redhat.com> References: <20110329013229.20e6168f.takuya.yoshikawa@gmail.com> <20110329013407.c7bcadcc.takuya.yoshikawa@gmail.com> <4D988927.4020003@redhat.com> <20110404005907.0edba901.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, gleb@redhat.com To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:14358 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752004Ab1DCQE0 (ORCPT ); Sun, 3 Apr 2011 12:04:26 -0400 In-Reply-To: <20110404005907.0edba901.takuya.yoshikawa@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/03/2011 06:59 PM, Takuya Yoshikawa wrote: > > I think it's easier to just write directly instead of going through > > 'struct operand'. > > > > Probably emulate_push() should do the write (look at segmented_write() > > in my 'Emulator segment checks' patchset), and everything else can call > > that. 'struct operand' is for multiplexing register/memory accesses, > > which is not the case with the stack. > > I agree with you. I will update! > > > IMHO, we are using dst operand for too many things. > > In the case of CMP, I first tried to use src2 to clearly follow the > SDM's "second source operand" terminology. But it seemed not worth > it now. > Ah, CMP is encoded as dst/src, so it's best to just disable writeback there. We could have a bit in the decode tables to auto-disable writeback, but not sure it is worth it. -- error compiling committee.c: too many arguments to function