All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH 3/3] KVM: x86 emulator: get rid of "restart" in emulation context.
Date: Tue, 24 Aug 2010 16:52:55 +0300	[thread overview]
Message-ID: <20100824135255.GD10499@redhat.com> (raw)
In-Reply-To: <4C73CBF6.1050809@redhat.com>

On Tue, Aug 24, 2010 at 04:41:10PM +0300, Avi Kivity wrote:
>  On 08/24/2010 04:37 PM, Gleb Natapov wrote:
> >On Tue, Aug 24, 2010 at 04:13:38PM +0300, Avi Kivity wrote:
> >>  On 08/24/2010 02:30 PM, Gleb Natapov wrote:
> >>>x86_emulate_insn() will return 1 if instruction can be restarted
> >>>without re-entering a guest.
> >>>
> >>So now we have an undocumented -1/0/1 return code?
> >>
> >>Better to have an enum for this.
> >>
> >We already have two. First is X86EMUL_ (not enum but close) for
> >more or less internal emulator use. Second is EMULATE_* for users of
> >emulate_instruction() now you want one more enum for communication
> >between emulate_instruction() and x86_emulate_insn(). Lost in enums.
> >emulate_instruction() and x86_emulate_insn() are tightly coupled right
> >now should we define formal interface between them? May be comment will
> >be enough?
> 
> Can we reuse one or the other?  Perhaps with extensions?
> 
We can, of course. But for me it looks as arbitrary as -1/0/1 since not
all enum values have meanings to the caller.

--
			Gleb.

  reply	other threads:[~2010-08-24 13:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24 11:30 [PATCH 1/3] KVM: x86 emulator: Rename variable that shadows another local variable Gleb Natapov
2010-08-24 11:30 ` [PATCH 2/3] KVM: x86 emulator: move string instruction completion check into separate function Gleb Natapov
2010-08-24 13:11   ` Avi Kivity
2010-08-24 13:20     ` Gleb Natapov
2010-08-24 13:24       ` Avi Kivity
2010-08-24 11:30 ` [PATCH 3/3] KVM: x86 emulator: get rid of "restart" in emulation context Gleb Natapov
2010-08-24 13:13   ` Avi Kivity
2010-08-24 13:37     ` Gleb Natapov
2010-08-24 13:41       ` Avi Kivity
2010-08-24 13:52         ` Gleb Natapov [this message]
2010-08-24 14:01           ` Avi Kivity
2010-08-24 14:06             ` Gleb Natapov
2010-08-24 14:28               ` Avi Kivity
2010-08-24 14:46                 ` Gleb Natapov

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=20100824135255.GD10499@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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.