From owner-freebsd-virtualization@freebsd.org Fri Oct 12 13:03:00 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BAB610BD125 for ; Fri, 12 Oct 2018 13:03:00 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3993B81AEC for ; Fri, 12 Oct 2018 13:03:00 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4986820D93 for ; Fri, 12 Oct 2018 09:02:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 12 Oct 2018 09:02:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h=to :from:subject:message-id:date:mime-version:content-type; s=fm3; bh=MCsJuk/re/DbJ2Keu/RWzaj/2FB1n3ySU4sk1gaPcpA=; b=M+VNLRPHDO4r KnZUHPQP7gpMF2S0wFRML/jQMDGpyUFziJIwkFz1zy2pvLbVbkOGzz3+3mzWTYYq Kv7cJz06mEBxtvBUOiHYbqDl4SGXdpfSaehh1xnGnUz31Y2Em0/Kg4N/k5l7lL0a sWjdptQDzP/kSZm8BSxZ8YPNU7fBsBehdlregT0GoQqrGzlS5k+7vAvUBl5jfY4q 2L7Y9kjMevsQcZS8YZv2FT38E5TNzlz9I4Hrniie2QZMRZVPDWrDC45nB5hjt6gj PS6YVPxaI/rnSWbAvjW+i7Ph4R86WCer+fWGCfgikhOGlfPmAqiR38c10kPGFZeR bjik7TFbLg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=MCsJuk/re/DbJ2Keu/RWzaj/2FB1n 3ySU4sk1gaPcpA=; b=FmXt22YB7Mp/dX+yVUm+fj03UTigdHXXrtXIFxI4Ep+fA WWuv7ti6ZTXYcz61gSEQ19U2B4RZD12acRxfS2Ym951J82AWpISJXORmIKOvhx2v /LShVFkxFzp75rpnOnJFz9aCLzgCncJHS/nFExDcRL0w82kOTw3G8mpTJFh7kWO/ uyAI+xA+L6BzEvUPlGhOCq1NQwps2HoLi1qh+4viYy2xDL1ufuYUB+XkNpBSXqC6 QITlhPAG6XSYJGGM+kyGODja/HDdgyrRC+Sf+oly1lBdw2fy4bE0vFzjf9vDGJvI KCByK/Kox6wGDUn2yT2VvPVXAPKXGd4vJzDG5B8Kg== X-ME-Sender: X-ME-Proxy: Received: from [192.168.1.2] (unknown [94.233.225.150]) by mail.messagingengine.com (Postfix) with ESMTPA id 324AA102D7 for ; Fri, 12 Oct 2018 09:02:57 -0400 (EDT) To: freebsd-virtualization From: Yuri Pankov Subject: bhyve VM using BHYVE_UEFI.fd gets EPT violation Openpgp: preference=signencrypt Autocrypt: addr=yuripv@yuripv.net; keydata= xsBNBFu8u6IBCADB11gP0QwnorrHjqAtKLHKHNHskhy0s7jqJKfx0YqXgVBKGLJ9/mjLAz0F CBNvemHSDDTs0mEZ9cBKKi6cmsav6+UQgr//yai6hvXLBJqKchSFO4MhmdvBtsGFq1yKz5Zi uhjmimKyIpgBgvMdbgGbGq6cnSB2uEPmZuJr419SVRODOkXukU+F5WHgaHzDdHAIu1asCt2B +6msxqIqlFWcXyZyTGicTGGvC/PFIsVRUtD1dIJANTC876g7DTb7LZXWiWwJpSJ4GKMXMHVX Ct9BoQ4i3nhKbOxb6Io1wsy+NFyWsTJ9KYrxKKPJP3oG8BWb/cqlFqnE4eNSsiq2q7krABEB AAH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dK/GRt2Jy +jsnTfUWuQllbzMP0MfhCDMk1Mo8WvDH2/cOEP/yLKf20a+cd6nLs7bidjmGXo9pyuBKAtV6 Kv+VRu54AL+A/UBYu/eB3Dtvzcnut+1Zq6KaP++kUwPwINLIk04OBDwN0zRNTiqMAFYYyz2v ZHBB6E1th/l//ZC5b9Dk0ZpFI1bYdL9ymnrZe1MqbGPnDCToQxu00T/pZCm6Z92YrZQYuNwl Message-ID: <733a71ba-fc28-1aed-a0be-16e676e18159@yuripv.net> Date: Fri, 12 Oct 2018 16:02:45 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="83hJCI9csgeDcJ6mq4TLLZvD2XYbaaxSu" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.27 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: Fri, 12 Oct 2018 13:03:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --83hJCI9csgeDcJ6mq4TLLZvD2XYbaaxSu Content-Type: multipart/mixed; boundary="R1JJ7YeE9W6ptJz2L9VvRavkIUU8ugmwz"; protected-headers="v1" From: Yuri Pankov To: freebsd-virtualization Message-ID: <733a71ba-fc28-1aed-a0be-16e676e18159@yuripv.net> Subject: bhyve VM using BHYVE_UEFI.fd gets EPT violation --R1JJ7YeE9W6ptJz2L9VvRavkIUU8ugmwz Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi, I'm taking my first steps in using bhyve, and the first showstopper seems to be that using '-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd' gets me immediate vm exit with exit_reason being 48 (EPT violation). Relevant part of dmesg: FreeBSD 12.0-ALPHA9 r339291 GENERIC amd64 FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) WARNING: WITNESS option enabled, expect reduced performance. VT(efifb): resolution 800x600 CPU: Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz (2200.04-MHz K8-class CPU)= Origin=3D"GenuineIntel" Id=3D0x306e4 Family=3D0x6 Model=3D0x3e Step= ping=3D4 Features=3D0xbfebfbff Features2=3D0x7fbee3ff AMD Features=3D0x2c100800 AMD Features2=3D0x1 Structured Extended Features=3D0x281 XSAVE Features=3D0x1 VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr TSC: P-state invariant, performance statistics real memory =3D 274877906944 (262144 MB) avail memory =3D 267769249792 (255364 MB) Simplified invocation line (I tried with a lot more options initially, but this seems to get the same): # bhyve -c 2 -m 2G -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd test vm exit[0] reason VMX rip 0x000000000000fff0 inst_length 3 status 0 exit_reason 48 (EPT violation) qualification 0x0000000000000184 inst_type 0 inst_error 0 Abort trap # bhyve -c 2 -m 2G -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CSM.fd test vm exit[0] reason VMX rip 0x000000000000fff0 inst_length 3 status 0 exit_reason 48 (EPT violation) qualification 0x0000000000000184 inst_type 0 inst_error 0 Abort trap Any hints? --R1JJ7YeE9W6ptJz2L9VvRavkIUU8ugmwz-- --83hJCI9csgeDcJ6mq4TLLZvD2XYbaaxSu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+Gq3PsPeLT4tL/9wk4vgf7Eq4WwFAlvAm3UACgkQk4vgf7Eq 4WytNwf/XbAKldbwCclDUCSb/iSzkMovhMsYCPTvWVW6EEV6n4/EPuYGt32ZKTXJ 7bb4j7c1YSNYpJ5fmNwXbSFC6ZXjY7POdJi8Yuk7T0wp1NTw41CtgmpnEVkEDghH /Be+6bIgysuWdLQbIh5vBG4fENGnyBV1zm+2c0cKQFzSwWq9BK20mlFVawmiCKLx JU8Fqn+meFmj2DLS/goVlvf6xoZ3AOdaQBQRpmTu5Al/lcU707Io5HO67gRIEzdB qhkiaAnhBduuwah6KeSaBklGp83oPuNNwucWSDAUY2PdXR4mYHyR2MHVGVKDd1yu dMVSLjUJ6+sZYsiaECqou8ZeM1wBGw== =ow+d -----END PGP SIGNATURE----- --83hJCI9csgeDcJ6mq4TLLZvD2XYbaaxSu--