From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Yongjun Subject: Re: [PATCH] x86 emulator: Add IRET instruction Date: Mon, 26 Jul 2010 11:09:21 +0800 Message-ID: <4C4CFC61.8020409@cn.fujitsu.com> References: <1280085618-27368-1-git-send-email-m.gamal005@gmail.com> <4C4CCFD0.6090203@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Paolo Bonzini , avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org To: Mohammed Gamal Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:54926 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753288Ab0GZDMQ convert rfc822-to-8bit (ORCPT ); Sun, 25 Jul 2010 23:12:16 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: > On Mon, Jul 26, 2010 at 2:59 AM, Paolo Bonzini = wrote: > =20 >> On 07/25/2010 09:20 PM, Mohammed Gamal wrote: >> =20 >>> + if (c->op_bytes =3D=3D 4) >>> + temp_eflags =3D ((temp_eflags& 0x257fd5) | (ctxt->= eflags& >>> 0x1a0000)); >>> =20 >> Should this do also >> >> if (c->op_bytes =3D=3D 2) >> temp_eflags =3D ((temp_eflags & 0x7fd5) | (ctxt->eflags & ~0xffff= L)); >> >> ? >> =20 > I don't think this is needed. The temp_eflags value is assigned > directly to eflags if we're operand size is 16 bits. At least that's > what the Intel manual says! > =20 Intel manual says=EF=BC=9A EFLAGS[15:0] =E2=86=90 Pop(); > =20 >> Or better, extract a new function computing the mask from emulate_po= pf, >> which would do something similar to what I wrote above. >> >> Paolo >> >> =20 > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > =20