Date: Thu, 21 Jan 2016 00:12:27 -0800 From: Peter Grehan <grehan@freebsd.org> To: Qian Wanpeng <wanpengqian@gmail.com> Cc: FreeBSD virtualization <freebsd-virtualization@freebsd.org> Subject: Re: Failed to emulate instruction [0x40 0x22 0x3c 0x25 0x23 0xd0 0x5f 0xff 0x31 0xf6 0xb9 0xfe 0x00 0x00 0x00] at 0xffffffff800796ac Message-ID: <56A092EB.8060805@freebsd.org> In-Reply-To: <CANBJ%2BxQ8nCLojRi%2Bi6UhLGr2Yzwc2N3epL_JUWVVL5Qemev26w@mail.gmail.com> References: <CANBJ%2BxQ8nCLojRi%2Bi6UhLGr2Yzwc2N3epL_JUWVVL5Qemev26w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, > I success run RHEL 5.9/6.5/6.6 in bhyve. > when I try boot rhel-server-5.4-x86_64-dvd.iso, the bhyve exit with > following error > > Failed to emulate instruction [0x40 0x22 0x3c 0x25 0x23 0xd0 0x5f 0xff 0x31 > 0xf6 0xb9 0xfe 0x00 0x00 0x00] at 0xffffffff800796ac > > and with bhyve exited with status 134, > also have a bhyve.core > > the FreeBSD version is SVN 11-CURRENT r291495. > > anything I can help to find what is going on? Thanks for the report. I was able to repro this and get the same error. Instruction emulation takes place on an EPT fault, and when bhyve can't handle this and exits, a 'bhyvectl --get-all' can be used to extraxt some post-mortem state. In this case, the gla/gpa associated with the exit can be found: ... gla[0] 0xffffffffff5fd023 gpa[0] 0x00000000fee00023 ... The gpa is in local APIC ID register. It's not 4-byte aligned, which is a bit unusual, so is probably a byte instruction. Putting the instruction bytes into a small program and using gdb as a disassembler gives: (gdb) x/i &a 0x6009ec <a>: and 0xffffffffff5fd023,%dil It's the 'REX + 22 /r' form of the AND instruction. This isn't supported by bhyve - it only des the 22/81/83 variants of AND, so will have to be added. later, Peter.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56A092EB.8060805>