From owner-freebsd-virtualization@freebsd.org Thu Jan 21 08:12:36 2016 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFDADA8B0AB for ; Thu, 21 Jan 2016 08:12:36 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 7360C1C1A for ; Thu, 21 Jan 2016 08:12:36 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTPS id 325CA20B4BFA for ; Thu, 21 Jan 2016 18:12:34 +1000 (AEST) Received: from localhost (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 2C93028098C for ; Thu, 21 Jan 2016 18:12:34 +1000 (AEST) X-Amavis-Modified: Mail body modified (using disclaimer) - iredmail.onthenet.com.au Received: from iredmail.onthenet.com.au ([127.0.0.1]) by localhost (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QurjEkoFMaIC for ; Thu, 21 Jan 2016 18:12:34 +1000 (AEST) Received: from Peters-MacBook-Pro.local (c-67-180-92-13.hsd1.ca.comcast.net [67.180.92.13]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 7C2DD280F98; Thu, 21 Jan 2016 18:12:31 +1000 (AEST) Subject: Re: Failed to emulate instruction [0x40 0x22 0x3c 0x25 0x23 0xd0 0x5f 0xff 0x31 0xf6 0xb9 0xfe 0x00 0x00 0x00] at 0xffffffff800796ac To: Qian Wanpeng References: From: Peter Grehan Cc: FreeBSD virtualization Message-ID: <56A092EB.8060805@freebsd.org> Date: Thu, 21 Jan 2016 00:12:27 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=BP8T1AkG c=1 sm=1 tr=0 a=A6CF0fG5TOl4vs6YHvqXgw==:117 a=5eVCmCvhg37cu/pjidAGzw==:17 a=3FMX7HLxAAAA:8 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=6I5d2MoRAAAA:8 a=C_IRinGWAAAA:8 a=N659UExz7-8A:10 a=7aQ_Q-yQQ-AA:10 a=x2I2xfUZZ_BBbyPgdW4A:9 a=pILNOxqGKmIA:10 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2016 08:12:36 -0000 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 : 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.