From: Takuya Yoshikawa Subject: Re: [RFC PATCH 2/2] KVM: x86 emulator: Cleanup emulate_push() writebacks Date: Mon, 4 Apr 2011 00:59:07 +0900 Message-ID: <20110404005907.0edba901.takuya.yoshikawa@gmail.com> References: <20110329013229.20e6168f.takuya.yoshikawa@gmail.com> <20110329013407.c7bcadcc.takuya.yoshikawa@gmail.com> <4D988927.4020003@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, gleb@redhat.com To: Avi Kivity Return-path: Received: from mail-yw0-f46.google.com ([209.85.213.46]:40164 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752004Ab1DCP7M (ORCPT ); Sun, 3 Apr 2011 11:59:12 -0400 Received: by ywj3 with SMTP id 3so1927645ywj.19 for ; Sun, 03 Apr 2011 08:59:12 -0700 (PDT) In-Reply-To: <4D988927.4020003@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: > 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. Takuya -- Takuya Yoshikawa