All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>, xen-devel@lists.xen.org
Cc: "Lengyel, Tamas" <tlengyel@novetta.com>
Subject: Re: Failed vm entry when emulating in hvm_do_resume()
Date: Mon, 4 Apr 2016 15:43:39 +0100	[thread overview]
Message-ID: <57027D9B.7040308@citrix.com> (raw)
In-Reply-To: <57026CDB.4090504@bitdefender.com>

On 04/04/16 14:32, Razvan Cojocaru wrote:
> Hello,
>
> As a test, I've modified xen-access.c to this simplified skeleton:
>
> http://pastebin.com/48WYwW00
>
> then started up an x86 Windows 7 HVM guest, and ran it with:
>
> # ./xen-access <dom_id> write
>
> once the login screen appeared. The guest promptly crashed with this
> backtrace:
>
> http://pastebin.com/Bz0GeFta
>
> The modified xen-access.c simply removes write rights for all of the
> guest's pages, then attempts to emulate all instructions that might
> cause a page fault. While I didn't expect the guest to run in a useable
> manner, or Xen to be able to emulate all the instructions, I did not
> expect the guest to crash.

This is just a plain emulation bug in 'cli', and has already been
reported on the list.  Noone has addressed the issue yet.

The vmentry failure will be eflags not matching up with some other vmcs
state.  Looks like you have valid VMEntry intr_info injecting vector
0xd1, and eflags.IF disabled.  This smells like a bug when considering
whether to inject the next pending interrupt from the lapic.

The reason you are seeing this with introspection is because you are the
first people to test these codepaths.  Normally, there is no way a 'cli'
instruction could fault for emulation, because it has no memory operand.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      reply	other threads:[~2016-04-04 14:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 13:32 Failed vm entry when emulating in hvm_do_resume() Razvan Cojocaru
2016-04-04 14:43 ` Andrew Cooper [this message]

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=57027D9B.7040308@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=tlengyel@novetta.com \
    --cc=xen-devel@lists.xen.org \
    /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.