All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: Mohammed Gamal <m.gamal005@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH] x86 emulator: Add IRET instruction
Date: Mon, 26 Jul 2010 11:09:21 +0800	[thread overview]
Message-ID: <4C4CFC61.8020409@cn.fujitsu.com> (raw)
In-Reply-To: <AANLkTi=yCp6URrNdnNri4SG_VdvQdLBdZmH6uhCUwON3@mail.gmail.com>


> On Mon, Jul 26, 2010 at 2:59 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>   
>> On 07/25/2010 09:20 PM, Mohammed Gamal wrote:
>>     
>>> +       if (c->op_bytes == 4)
>>> +               temp_eflags = ((temp_eflags&  0x257fd5) | (ctxt->eflags&
>>>  0x1a0000));
>>>       
>> Should this do also
>>
>> if (c->op_bytes == 2)
>>    temp_eflags = ((temp_eflags & 0x7fd5) | (ctxt->eflags & ~0xffffL));
>>
>> ?
>>     
> 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!
>   

Intel manual says:

EFLAGS[15:0] ← Pop();


>   
>> Or better, extract a new function computing the mask from emulate_popf,
>> which would do something similar to what I wrote above.
>>
>> Paolo
>>
>>     
> --
> 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
>
>
>   

  reply	other threads:[~2010-07-26  3:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-25 19:20 [PATCH] x86 emulator: Add IRET instruction Mohammed Gamal
2010-07-25 23:59 ` Paolo Bonzini
2010-07-26  0:07   ` Mohammed Gamal
2010-07-26  3:09     ` Wei Yongjun [this message]
2010-07-26  8:47     ` Paolo Bonzini
2010-07-26  9:00       ` Avi Kivity
2010-07-26  9:31         ` Paolo Bonzini
2010-07-26  9:32         ` Paolo Bonzini
2010-07-26 11:38 ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2010-07-28  9:38 Mohammed Gamal
2010-07-28 10:30 ` Avi Kivity
2010-07-28 13:30 ` Paolo Bonzini
2010-07-28 13:49   ` Paolo Bonzini
2010-07-28 17:15 ` Marcelo Tosatti
2010-07-27 23:06 Mohammed Gamal
2010-07-28  4:20 ` Avi Kivity
2010-07-25 19:18 Mohammed Gamal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C4CFC61.8020409@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=m.gamal005@gmail.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.