All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Mohammed Gamal <m.gamal005@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] x86 emulator: Add 'push/pop sreg' instructions
Date: Wed, 19 Aug 2009 16:03:54 +0300	[thread overview]
Message-ID: <4A8BF83A.4090306@redhat.com> (raw)
In-Reply-To: <52d4a3890908190552y51f0d38fnbb2919d5581fb931@mail.gmail.com>

On 08/19/2009 03:52 PM, Mohammed Gamal wrote:
>
>>> +static void emulate_push_sreg(struct x86_emulate_ctxt *ctxt, int seg)
>>> +{
>>> +       struct decode_cache *c =&ctxt->decode;
>>> +       struct kvm_segment segment;
>>> +
>>> +       if (ctxt->mode == X86EMUL_MODE_PROT64&&    (seg != VCPU_SREG_FS ||
>>> +                                                  seg != VCPU_SREG_GS)) {
>>> +               kvm_queue_exception(ctxt->vcpu, UD_VECTOR);
>>> +               return;
>>> +       }
>>>
>>>        
>> It's better to check at the callsite, in case the opcode is ever reused for
>> a new instruction.  Or even better, add a new decode flag No64 so we can do
>> this during the decode stage.
>>      
> Good idea, but I believe it'd be better to introduce it in a separate
> patch so that we can update all instructions incompatible with long
> mode in one go. I'll move the checks to the call site for the time
> being.
>    

Sure.  Or do the No64 patch first.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2009-08-19 13:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19  4:11 [PATCH] x86 emulator: Add 'push/pop sreg' instructions Mohammed Gamal
2009-08-19  8:32 ` Avi Kivity
2009-08-19 12:52   ` Mohammed Gamal
2009-08-19 13:03     ` Avi Kivity [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-08-19 13:26 Mohammed Gamal
2009-08-18 12:48 Mohammed Gamal
2009-08-18 14:39 ` Avi Kivity
2009-08-18 19:40   ` Mohammed Gamal
2009-08-19  8:23     ` Avi Kivity

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=4A8BF83A.4090306@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=m.gamal005@gmail.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.