xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Andri Möll" <andri@dot.ee>
Cc: xen-devel@lists.xen.org
Subject: Re: "MMIO emulation failed" from booting OVMF on Xen v4.9.0
Date: Fri, 18 Aug 2017 17:24:50 +0100	[thread overview]
Message-ID: <25a56340-73f9-46e6-c7cd-598fb2e63f13@citrix.com> (raw)
In-Reply-To: <20170818155522.GB28399@char.us.oracle.com>

On 18/08/17 16:55, Konrad Rzeszutek Wilk wrote:
> On Wed, Aug 16, 2017 at 06:47:23PM +0000, Andri Möll wrote:
>
>> (d1) Invoking OVMF ...
>> (XEN) MMIO emulation failed: d1v0 16bit @ f000:0000ff54 -> 66 ea 5c ff ff ff 10 00 b8 40 06 00 00 0f 22
> That code is:
> cripts/decodecode 
> Code: 66 ea 5c ff ff ff 10 00 b8 40 06 00 00 0f 22
> Code: 66 ea 5c ff ff ff 10 00 b8 40 06 00 00 0f 22
> sed: -e expression #1, char 1: unknown command: `-'
>
> Code starting with the faulting instruction
> ===========================================
>    0:   66 ea                   data16 (bad) 
>    2:   5c                      pop    %rsp
>    3:   ff                      (bad)  
>    4:   ff                      (bad)  
>    5:   ff 10                   callq  *(%rax)
>    7:   00 b8 40 06 00 00       add    %bh,0x640(%rax)
>    d:   0f                      .byte 0xf
>    e:   22                      .byte 0x22
>
> Which looks to be garbage.

That is because you're disassembling it as 64bit code, not 16. :)

The offending instruction is actually ljmpl $0x10,$0xffffff5c, and is
almost certainly following a write to CR0 which enables protected mode.

0xea is not valid in 64bit mode.  Decoding it is already complicated
because it takes two adjacent immediate operands, with the offset
encoded before the segment. There is no "immediate operand override"
prefix in x86, so making the instruction usable in a 64bit code segment
is tricky.  Given how rarely it is used, I expect AMD decided it wasn't
worth the effort or silicon trying to make it work.

~Andrew

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

      reply	other threads:[~2017-08-18 16:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 18:47 "MMIO emulation failed" from booting OVMF on Xen v4.9.0 Andri Möll
2017-08-17  8:49 ` Jan Beulich
2017-08-17 10:56   ` Andrew Cooper
2017-08-17 13:53     ` Alexey G
2017-08-17 10:51 ` Anthony PERARD
2017-08-18 15:55 ` Konrad Rzeszutek Wilk
2017-08-18 16:24   ` 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=25a56340-73f9-46e6-c7cd-598fb2e63f13@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=andri@dot.ee \
    --cc=konrad.wilk@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).