All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Mukesh Rathor <mukesh.rathor@oracle.com>,
	"Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
	kris.van.hees@oracle.com
Subject: Re: Invalid op code emulation for HVM guest and GPF
Date: Fri, 23 Mar 2012 19:17:47 +0000	[thread overview]
Message-ID: <CB927CDB.2F409%keir.xen@gmail.com> (raw)
In-Reply-To: <20120323114425.07bd6db7@mantra.us.oracle.com>

On 23/03/2012 18:44, "Mukesh Rathor" <mukesh.rathor@oracle.com> wrote:

> Hey Keir,
> 
> DTRACE in linux/solaris guests use invalid op code sequence:
> 
> opcode trap is: 0xF0 0x90 0x90 0x90 0x90 (LOCK NOP NOP NOP NOP)
> 
> to receive UD, but they get GPF instead. (xen 4.1.2)
> 
> Looking at hvm_emulate_one() I see place where it generates GPF if not
> expected sequence. Do you know quickly what can be done to deliver UD
> for the above sequence, or what single byte they can use to generate
> UD? (int 6 is two byte instr and doesn't work for them).

You'll have to point out the path taken. AFAICS the sequence will cause a
#UD trap into Xen, which will execute vmx_vmexit_ud_intercept(), should get
X86EMUL_UNHANDLEABLE from hvm_emulate_one() and then inject the #UD back up
into the guest.

I don't see where the #GP would come from: certainly hvm_emulate_one()
itself doesn't appear to generate any guest exceptions. Is it coming from
the emulator itself? Might be a bug to be fixed if so.

 -- Keir

> thanks a lot,
> Mukesh

  parent reply	other threads:[~2012-03-23 19:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 18:44 Invalid op code emulation for HVM guest and GPF Mukesh Rathor
2012-03-23 18:58 ` Andrew Cooper
2012-03-23 19:17 ` Keir Fraser [this message]
2012-03-23 19:28   ` Mukesh Rathor
2012-03-23 19:20 ` Andrew Cooper
2012-03-23 19:30   ` Mukesh Rathor
2012-03-23 19:38     ` Andrew Cooper
2012-03-23 19:58       ` Andrew Cooper
2012-03-23 20:40         ` Keir Fraser

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=CB927CDB.2F409%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=Xen-devel@lists.xensource.com \
    --cc=kris.van.hees@oracle.com \
    --cc=mukesh.rathor@oracle.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.