From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/5] KVM: x86 emulator: Use single stage decoding for PUSH/POP XS instructions Date: Tue, 22 Mar 2011 15:03:11 +0200 Message-ID: <4D889E0F.3090007@redhat.com> References: <20110314001524.f35e8a3f.takuya.yoshikawa@gmail.com> <20110314001907.95b806ed.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]:55098 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754228Ab1CVNDT (ORCPT ); Tue, 22 Mar 2011 09:03:19 -0400 In-Reply-To: <20110314001907.95b806ed.takuya.yoshikawa@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/13/2011 05:19 PM, Takuya Yoshikawa wrote: > From: Takuya Yoshikawa > > PUSH ES/CS/SS/DS/FS/GS and POP ES/SS/DS/FS/GS are converted. > > > +static int em_push_es(struct x86_emulate_ctxt *ctxt) > +{ > + emulate_push_sreg(ctxt, ctxt->ops, VCPU_SREG_ES); > + return X86EMUL_CONTINUE; > +} I thought of adding generic sreg decoding, so we can use em_push()/em_pop() here. It can be done later, though, and really there's no huge advantage here. -- error compiling committee.c: too many arguments to function