All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Mohammed Gamal <m.gamal005@gmail.com>
Cc: avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] x86: Bail out on unemulated instructions
Date: Sun, 15 Aug 2010 15:49:00 +0300	[thread overview]
Message-ID: <20100815124900.GS10499@redhat.com> (raw)
In-Reply-To: <AANLkTimodBvfy6KQkXf4VYZYRbnEFae3ja5HQ0N+QC0X@mail.gmail.com>

On Sun, Aug 15, 2010 at 03:43:15PM +0300, Mohammed Gamal wrote:
> 2010/8/15 Gleb Natapov <gleb@redhat.com>:
> > On Sun, Aug 15, 2010 at 03:40:00PM +0300, Mohammed Gamal wrote:
> >> On Sun, Aug 15, 2010 at 10:32 AM, Gleb Natapov <gleb@redhat.com> wrote:
> >> > On Sat, Aug 14, 2010 at 06:51:34PM +0300, Mohammed Gamal wrote:
> >> >> If emulation fails due to the instruction being unemulated. Return immediately
> >> >> instead of restarting the instruction and infinitely trying to execute it.
> >> >>
> >> > This is already handled correctly as far as I can see. Sometimes
> >> > instruction should be retried and reexecute_instruction() checks
> >> > for that case. If instruction emulation fails in big real mode
> >> > re-executing instruction will be useless though, so what should be done
> >> > is to make reexecute_instruction() return false if vcpu is in big real
> >> > mode and cpu relies on emulation to handle it.
> >> We don't have a separate mode for big real mode. The emulation modes
> >> we have are real and vm86
> >>
> > That doesn't makes the patch right. So we will have to figure something
> > out.
> True. Can we do it for real mode in general (i.e. X86EMUL_MODE_REAL)?
If we flush all shadow pages when moving from paged mode to non paged
checking for X86EMUL_MODE_REAL sounds enough to me, but Avi knows better.
Or we can add is_big_real_mode() callback to x86_ops and implement it in
vmx accordingly.

--
			Gleb.

  reply	other threads:[~2010-08-15 16:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-14 15:51 [PATCH 1/2] x86 emulator: Fix emulator return values Mohammed Gamal
2010-08-14 15:51 ` [PATCH 2/2] x86: Bail out on unemulated instructions Mohammed Gamal
2010-08-15  7:32   ` Gleb Natapov
2010-08-15 12:40     ` Mohammed Gamal
2010-08-15 12:41       ` Gleb Natapov
2010-08-15 12:43         ` Mohammed Gamal
2010-08-15 12:49           ` Gleb Natapov [this message]
2010-08-15 15:58             ` Avi Kivity
2010-08-15 16:11               ` Gleb Natapov
2010-08-15 16:17                 ` Avi Kivity
2010-08-15 15:40           ` 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=20100815124900.GS10499@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=m.gamal005@gmail.com \
    --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.