From owner-freebsd-virtualization@freebsd.org  Sun Jul 14 23:37:45 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id AEBD7AB018
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Sun, 14 Jul 2019 23:37:45 +0000 (UTC)
 (envelope-from pete@nomadlogic.org)
Received: from mail.nomadlogic.org (mail.nomadlogic.org [174.136.98.114])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mail.nomadlogic.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 86C7A6C08D
 for <freebsd-virtualization@freebsd.org>; Sun, 14 Jul 2019 23:37:44 +0000 (UTC)
 (envelope-from pete@nomadlogic.org)
Received: from [192.168.1.206] (cpe-23-243-162-239.socal.res.rr.com
 [23.243.162.239])
 by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id c7852653
 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO
 for <freebsd-virtualization@freebsd.org>;
 Sun, 14 Jul 2019 23:37:36 +0000 (UTC)
To: FreeBSD virtualization <freebsd-virtualization@freebsd.org>
From: Pete Wright <pete@nomadlogic.org>
Subject: Custom Qcow2 Images
Message-ID: <459c53d0-f00b-6ce3-dfab-de3ddac1c0bb@nomadlogic.org>
Date: Sun, 14 Jul 2019 16:37:36 -0700
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101
 Thunderbird/60.8.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Rspamd-Queue-Id: 86C7A6C08D
X-Spamd-Bar: -----
Authentication-Results: mx1.freebsd.org;
 spf=pass (mx1.freebsd.org: domain of pete@nomadlogic.org designates
 174.136.98.114 as permitted sender) smtp.mailfrom=pete@nomadlogic.org
X-Spamd-Result: default: False [-5.87 / 15.00]; ARC_NA(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org];
 DMARC_NA(0.00)[nomadlogic.org]; RCPT_COUNT_ONE(0.00)[1];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 IP_SCORE(-2.86)[ip: (-9.38), ipnet: 174.136.96.0/20(-4.61), asn: 25795(-0.25),
 country: US(-0.06)]; TO_DN_ALL(0.00)[];
 MX_GOOD(-0.01)[mail.nomadlogic.org];
 NEURAL_HAM_SHORT(-0.70)[-0.698,0]; FROM_EQ_ENVFROM(0.00)[];
 R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:25795, ipnet:174.136.96.0/20, country:US];
 MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[];
 RCVD_COUNT_TWO(0.00)[2]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Jul 2019 23:37:45 -0000

Hey there folks,
I am wondering if anyone has any pointers on creating a custom Qcow2 
FreeBSD that is akin in size to nanobsd.  I have an environment where we 
need to run a single binary and want to keep our disk image as small as 
possible.  It will run inside a user-mode Qemu process.  Reading through 
the nanobsd script it seems that it expects a raw disk for installation, 
so I do think using the nanobsd script itself well work well.  Has 
anyone else done something similar?  My goal is to have a disk image 
that is around 500MB.

Thanks in advance!
-pete

-- 
Pete Wright
pete@nomadlogic.org
@nomadlogicLA


From owner-freebsd-virtualization@freebsd.org  Sun Jul 14 23:59:34 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9198AB882
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Sun, 14 Jul 2019 23:59:34 +0000 (UTC)
 (envelope-from allanjude@freebsd.org)
Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6])
 (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 37BEB6CC75
 for <freebsd-virtualization@freebsd.org>; Sun, 14 Jul 2019 23:59:34 +0000 (UTC)
 (envelope-from allanjude@freebsd.org)
Received: from [10.1.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28])
 (Authenticated sender: allanjude.freebsd@scaleengine.com)
 by mx1.scaleengine.net (Postfix) with ESMTPSA id 80CD92659C
 for <freebsd-virtualization@freebsd.org>; Sun, 14 Jul 2019 23:59:27 +0000 (UTC)
Subject: Re: Custom Qcow2 Images
To: freebsd-virtualization@freebsd.org
References: <459c53d0-f00b-6ce3-dfab-de3ddac1c0bb@nomadlogic.org>
From: Allan Jude <allanjude@freebsd.org>
Openpgp: preference=signencrypt
Autocrypt: addr=allanjude@freebsd.org; prefer-encrypt=mutual; keydata=
 mQINBFVwZcYBEADwrZDH0xe0ZVjc9ORCc6PcBLwS/RTXA6NkvpD6ea02pZ8lPOVgteuuugFc
 D34LdDbiWr+479vfrKBh+Y38GL0oZ0/13j10tIlDMHSa5BU0y6ACtnhupFvVlQ57+XaJAb/q
 7qkfSiuxVwQ3FY3PL3cl1RrIP5eGHLA9hu4eVbu+FOX/q/XVKz49HaeIaxzo2Q54572VzIo6
 C28McX9m65UL5fXMUGJDDLCItLmehZlHsQQ+uBxvODLFpVV2lUgDR/0rDa0B9zHZX8jY8qQ7
 ZdCSy7CwClXI054CkXZCaBzgxYh/CotdI8ezmaw7NLs5vWNTxaDEFXaFMQtMVhvqQBpHkfOD
 7rjjOmFw00nJL4FuPE5Yut0CPyx8vLjVmNJSt/Y8WxxmhutsqJYFgYfWl/vaWkrFLur/Zcmz
 IklwLw35HLsCZytCN5A3rGKdRbQjD6QPXOTJu0JPrJF6t2xFkWAT7oxnSV0ELhl2g+JfMMz2
 Z1PDmS3NRnyEdqEm7NoRGXJJ7bgxDbN+9SXTyOletqGNXj/bSrBvhvZ0RQrzdHAPwQUfVSU2
 qBhQEi2apSZstgVNMan0GUPqCdbE2zpysg+zT7Yhvf9EUQbzPL4LpdK1llT9fZbrdMzEXvEF
 oSvwJFdV3sqKmZc7b+E3PuxK6GTsKqaukd/3Cj8aLHG1T1im1QARAQABtCJBbGxhbiBKdWRl
 IDxhbGxhbmp1ZGVAZnJlZWJzZC5vcmc+iQI/BBMBAgApBQJVcGXGAhsjBQkSzAMABwsJCAcD
 AgEGFQgCCQoLBBYCAwECHgECF4AACgkQGZU1PhKYC34Muw/+JOKpSfhhysWFYiRXynGRDe07
 Z6pVsn7DzrPUMRNZfHu8Uujmmy3p2nx9FelIY9yjd2UKHhug+whM54MiIFs90eCRVa4XEsPR
 4FFAm0DAWrrb7qhZFcE/GhHdRWpZ341WAElWf6Puj2devtRjfYbikvj5+1V1QmDbju7cEw5D
 mEET44pTuD2VMRJpu2yZZzkM0i+wKFuPxlhqreufA1VNkZXI/rIfkYWK+nkXd9Efw3YdCyCQ
 zUgTUCb88ttSqcyhik/li1CDbXBpkzDCKI6I/8fAb7jjOC9LAtrZJrdgONywcVFoyK9ZN7EN
 AVA+xvYCmuYhR/3zHWH1g4hAm1v1+gIsufhajhfo8/wY1SetlzPaYkSkVQLqD8T6zZyhf+AN
 bC7ci44UsiKGAplB3phAXrtSPUEqM86kbnHg3fSx37kWKUiYNOnx4AC2VXvEiKsOBlpyt3dw
 WQbOtOYM+vkfbBwDtoGOOPYAKxc4LOIt9r+J8aD+gTooi9Eo5tvphATf9WkCpl9+aaGbSixB
 tUpvQMRnSMqTqq4Z7DeiG6VMRQIjsXDSLJEUqcfhnLFo0Ko/RiaHd5xyAQ4DhQ9QpkyQjjNf
 /3f/dYG7JAtoD30txaQ5V8uHrz210/77DRRX+HJjEj6xCxWUGvQgvEZf5XXyxeePvqZ+zQyT
 DX61bYw6w6a5Ag0EVXBlxgEQAMy7YVnCCLN4oAOBVLZ5nUbVPvpUhsdA94/0/P+uqCIh28Cz
 ar56OCX0X19N/nAWecxL4H32zFbIRyDB2V/MEh4p9Qvyu/j4i1r3Ex5GhOT2hnit43Ng46z5
 29Es4TijrHJP4/l/rB2VOqMKBS7Cq8zk1cWqaI9XZ59imxDNjtLLPPM+zQ1yE3OAMb475QwN
 UgWxTMw8rkA7CEaqeIn4sqpTSD5C7kT1Bh26+rbgJDZ77D6Uv1LaCZZOaW52okW3bFbdozV8
 yM2u+xz2Qs8bHz67p+s+BlygryiOyYytpkiK6Iy4N7FTolyj5EIwCuqzfk0SaRHeOKX2ZRjC
 qatkgoD/t13PNT38V9tw3qZVOJDS0W6WM8VSg+F+bkM9LgJ8CmKV+Hj0k3pfGfYPOZJ/v18i
 +SmZmL/Uw2RghnwDWGAsPCKu4uZR777iw7n9Io6Vfxndw2dcS0e9klvFYoaGS6H2F13Asygr
 WBzFNGFQscN4mUW+ZYBzpTOcHkdT7w8WS55BmXYLna+dYer9/HaAuUrONjujukN4SPS1fMJ2
 /CS/idAUKyyVVX5vozoNK2JVC1h1zUAVsdnmhEzNPsvBoqcVNfyqBFROEVLIPwq+lQMGNVjH
 ekLTKRWf59MEhUC2ztjSKkGmwdg73d6xSXMuq45EgIJV2wPvOgWQonoHH/kxABEBAAGJAiUE
 GAECAA8FAlVwZcYCGwwFCRLMAwAACgkQGZU1PhKYC34w5A//YViBtZyDV5O+SJT9FFO3lb9x
 Zdxf0trA3ooCt7gdBkdnBM6T5EmjgVZ3KYYyFfwXZVkteuCCycMF/zVw5eE9FL1+zz9gg663
 nY9q2F77TZTKXVWOLlOV2bY+xaK94U4ytogOGhh9b4UnQ/Ct3+6aviCF78Go608BXbmF/GVT
 7uhddemk7ItxM1gE5Hscx3saxGKlayaOsdPKeGTVJCDEtHDuOc7/+jGh5Zxpk/Hpi+DUt1ot
 8e6hPYLIQa4uVx4f1xxxV858PQ7QysSLr9pTV7FAQ18JclCaMc7JWIa3homZQL/MNKOfST0S
 2e+msuRwQo7AnnfFKBUtb02KwpA4GhWryhkjUh/kbVc1wmGxaU3DgXYQ5GV5+Zf4kk/wqr/7
 KG0dkTz6NLCVLyDlmAzuFhf66DJ3zzz4yIo3pbDYi3HB/BwJXVSKB3Ko0oUo+6/qMrOIS02L
 s++QE/z7K12CCcs7WwOjfCYHK7VtE0Sr/PfybBdTbuDncOuAyAIeIKxdI2nmQHzl035hhvQX
 s4CSghsP319jAOQiIolCeSbTMD4QWMK8RL/Pe1FI1jC3Nw9s+jq8Dudtbcj2UwAP/STUEbJ9
 5rznzuuhPjE0e++EU/RpWmcaIMK/z1zZDMN+ce2v1qzgV936ZhJ3iaVzyqbEE81gDxg3P+IM
 kiYh4ZtPB4Q=
Message-ID: <c818efcd-5338-53dd-7056-e202f5c4c406@freebsd.org>
Date: Sun, 14 Jul 2019 19:59:26 -0400
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.7.2
MIME-Version: 1.0
In-Reply-To: <459c53d0-f00b-6ce3-dfab-de3ddac1c0bb@nomadlogic.org>
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="dFMyu6Byymr1BPF476cZ0it1l95mSlLuh"
X-Rspamd-Queue-Id: 37BEB6CC75
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[freebsd.org];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.98)[-0.984,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:6939, ipnet:209.51.160.0/19, country:US]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Jul 2019 23:59:34 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--dFMyu6Byymr1BPF476cZ0it1l95mSlLuh
Content-Type: multipart/mixed; boundary="kl2rIlTt1k8tFMWL84mZolJeNTSoabWYe";
 protected-headers="v1"
From: Allan Jude <allanjude@freebsd.org>
To: freebsd-virtualization@freebsd.org
Message-ID: <c818efcd-5338-53dd-7056-e202f5c4c406@freebsd.org>
Subject: Re: Custom Qcow2 Images
References: <459c53d0-f00b-6ce3-dfab-de3ddac1c0bb@nomadlogic.org>
In-Reply-To: <459c53d0-f00b-6ce3-dfab-de3ddac1c0bb@nomadlogic.org>

--kl2rIlTt1k8tFMWL84mZolJeNTSoabWYe
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 2019-07-14 19:37, Pete Wright wrote:
> Hey there folks,
> I am wondering if anyone has any pointers on creating a custom Qcow2
> FreeBSD that is akin in size to nanobsd.=C2=A0 I have an environment wh=
ere we
> need to run a single binary and want to keep our disk image as small as=

> possible.=C2=A0 It will run inside a user-mode Qemu process.=C2=A0 Read=
ing through
> the nanobsd script it seems that it expects a raw disk for installation=
,
> so I do think using the nanobsd script itself well work well.=C2=A0 Has=

> anyone else done something similar?=C2=A0 My goal is to have a disk ima=
ge
> that is around 500MB.
>=20
> Thanks in advance!
> -pete
>=20

I would expect the answer is `poudriere image` with a src.conf with many
WITHOUT_* knobs to disable things you don't need to get the image down
in size. There is likely a list of such knobs you could borrow from nanob=
sd.

--=20
Allan Jude


--kl2rIlTt1k8tFMWL84mZolJeNTSoabWYe--

--dFMyu6Byymr1BPF476cZ0it1l95mSlLuh
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQIcBAEBAgAGBQJdK8HeAAoJEBmVNT4SmAt+uW0QAJEbbe9/MHSIYO7ivX7JpOKy
JabL4uE5vbe2h9fGP6yWNLCIJYw1IO5ZXpkxBudjqONMw9JP3UG1jtjMSQvgFRzn
U63CGu/EPx2vwUfibJo9aDU0gpGbxc+5mV2elJE/sbljz2NwWkoh/T0kca1cDNUz
h1kw+YQbJvw6hlQ4up9FSI1zDg6yFMQAMZazVeyu+5TkT/UVuA/0zWBwtxM8Hf8j
tf1WGsLWtahvonEEa6nGMe8N1bh7koxg7y39z3RTLU4dRwGVnXOp8+8jhmR7MBmD
URrXOg30aAE97tzfWKWv3l2nETNJ83yqBo5FCeRvjgDd8RwiW/gWjJ5Xv/C6dxoW
cwPfAWZwkqGyX4437VzSuBHhkCtuWQqSbZAEGyxmyr+7HHlkUT5u+sfMQWttWU3f
gzcg6pVHx2SYYwv2lgroqp4fpbQrJkJo0ZVVm7ARwF1EdfhH4LPLR9iop963Kznq
Xe9ygeI9aCgciRjARy29YCHmbagmGna3JWLtX9IJRMmwg4x9gIUeMGNxtAb6xDtt
nNiLs6GCpN7FuFvYPQNQmaCiPrIPmne9TLDexlmof0MxeA7z5e9Dgp/bo/PC/fZj
k7JcnwMdnkbCuA/CBqUhIYnnCku+tckUOJRny3kp6Lo73+ddzHuLTTh7uFnJqhMz
DOQUhd4QOYb5w1PJJx3W
=wHah
-----END PGP SIGNATURE-----

--dFMyu6Byymr1BPF476cZ0it1l95mSlLuh--

From owner-freebsd-virtualization@freebsd.org  Mon Jul 15 01:31:00 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D35EAD5E1
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Mon, 15 Jul 2019 01:31:00 +0000 (UTC)
 (envelope-from pete@nomadlogic.org)
Received: from mail.nomadlogic.org (mail.nomadlogic.org [174.136.98.114])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mail.nomadlogic.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 716816FA65;
 Mon, 15 Jul 2019 01:30:59 +0000 (UTC)
 (envelope-from pete@nomadlogic.org)
Received: from [192.168.1.206] (cpe-23-243-162-239.socal.res.rr.com
 [23.243.162.239])
 by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id 4481fc01
 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO;
 Mon, 15 Jul 2019 01:30:57 +0000 (UTC)
Subject: Re: Custom Qcow2 Images
To: Allan Jude <allanjude@freebsd.org>, freebsd-virtualization@freebsd.org
References: <459c53d0-f00b-6ce3-dfab-de3ddac1c0bb@nomadlogic.org>
 <c818efcd-5338-53dd-7056-e202f5c4c406@freebsd.org>
From: Pete Wright <pete@nomadlogic.org>
Message-ID: <b7d74cfd-b974-43d0-9425-4382c2a2d61b@nomadlogic.org>
Date: Sun, 14 Jul 2019 18:30:56 -0700
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101
 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <c818efcd-5338-53dd-7056-e202f5c4c406@freebsd.org>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Rspamd-Queue-Id: 716816FA65
X-Spamd-Bar: -----
Authentication-Results: mx1.freebsd.org;
 spf=pass (mx1.freebsd.org: domain of pete@nomadlogic.org designates
 174.136.98.114 as permitted sender) smtp.mailfrom=pete@nomadlogic.org
X-Spamd-Result: default: False [-5.85 / 15.00]; ARC_NA(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[];
 R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[];
 MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[nomadlogic.org];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 IP_SCORE(-2.87)[ip: (-9.40), ipnet: 174.136.96.0/20(-4.62), asn: 25795(-0.26),
 country: US(-0.06)]; 
 MX_GOOD(-0.01)[cached: mail.nomadlogic.org];
 RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.68)[-0.678,0];
 FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[];
 MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:25795, ipnet:174.136.96.0/20, country:US];
 MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[];
 RCVD_COUNT_TWO(0.00)[2]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Jul 2019 01:31:00 -0000



On 7/14/19 4:59 PM, Allan Jude wrote:
> On 2019-07-14 19:37, Pete Wright wrote:
>> Hey there folks,
>> I am wondering if anyone has any pointers on creating a custom Qcow2
>> FreeBSD that is akin in size to nanobsd.  I have an environment where we
>> need to run a single binary and want to keep our disk image as small as
>> possible.  It will run inside a user-mode Qemu process.  Reading through
>> the nanobsd script it seems that it expects a raw disk for installation,
>> so I do think using the nanobsd script itself well work well.  Has
>> anyone else done something similar?  My goal is to have a disk image
>> that is around 500MB.
>>
>> Thanks in advance!
>> -pete
>>
> I would expect the answer is `poudriere image` with a src.conf with many
> WITHOUT_* knobs to disable things you don't need to get the image down
> in size. There is likely a list of such knobs you could borrow from nanobsd.
>
Thanks Allan - I hadn't thought of using poudriere in this way, I'll 
give this a shot tonight!

-p

-- 
Pete Wright
pete@nomadlogic.org
@nomadlogicLA


From owner-freebsd-virtualization@freebsd.org  Mon Jul 15 10:16:51 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77283B60FF
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Mon, 15 Jul 2019 10:16:51 +0000 (UTC)
 (envelope-from kek@semihalf.com)
Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com
 [IPv6:2a00:1450:4864:20::42b])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id E054389759
 for <freebsd-virtualization@freebsd.org>; Mon, 15 Jul 2019 10:16:48 +0000 (UTC)
 (envelope-from kek@semihalf.com)
Received: by mail-wr1-x42b.google.com with SMTP id x1so1437264wrr.9
 for <freebsd-virtualization@freebsd.org>; Mon, 15 Jul 2019 03:16:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=semihalf-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:from:date:message-id:subject:to;
 bh=CmdyX+nNcdwmuWccOU1IHfO1rqR46GIeor+swYsY2KY=;
 b=RmZXSD3dGaPO6Lskyk1XWKL/uix7TLM67pTCiOIpv8QNLkGPXcajDdLv9VQ5WHpC0o
 fy72MzP5al5dwoNLzacH30DTQ/VAoaV6ugzogAN2o2o2FdCAau2x44tPH5uTaZQUXUEG
 2Ey/2NzRibMzlA2xcV7oSnYIKVEIYvS7k1bNtQejS4iFmPr2mMZ/AqwEEhdTn3lD7NLP
 eDe+iayE+smKNm/0Njpb2cHjtIRs2czVGS827UQ5AX//R7YsM70eB7SmkQVwYdTd7rJs
 gG025wWZRIy8EYl/iMu3U8ngekXHNMHiXpQYzAI5ttYefIB0UHgpH/QkmnJtLiq6TjPR
 AH1Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=CmdyX+nNcdwmuWccOU1IHfO1rqR46GIeor+swYsY2KY=;
 b=cZZJNTZCq/Cd+pr71vwa3Z9/to3Hy4N8PeFVe+9kf+xxUz07F1fDTVnKXbzSZGTwsl
 ZBGwh7mWZqA5KS9t7yL6w2r/XFd5Ehnft5057jVHTrkUt8D/OadmAo1ON1ytGCOYYOFw
 wIXq3asj4mfKnaWQfYOyrUqvQXd1/ApkaEKOqaGF1xZBcKl6wBL0wbqjJ97l35ky9UI3
 UlboPBN+it7aAQEm4ouscPNKnx7FzuzAXR7LOCMXhrCEvXUpiuMi+Iysudze5o5WdkNp
 ehahgV8rnxtSrsp8vyF8oXRgFX/Gs9NSt+QskpXA90UNp2iJzbveikjgSoMaFhLULn+Y
 vSyQ==
X-Gm-Message-State: APjAAAVUuXQ8JJPMZMweh40eCPhiMKpzvTFt62j6tSCrFfK8il0AEByI
 it8GDD8UrggDqmRgkF+I2Z0LsG3uMcoAvWM3pt8D1FUe
X-Google-Smtp-Source: APXvYqzwBEq6kJSeXZNdyR7O+bCj9mPPEKh7V/2Nta+X+RQUwpyTWVAzeH6qnv1Z4VrEOYetVQ7LjNqv9OzzA0Oojoo=
X-Received: by 2002:a5d:5448:: with SMTP id w8mr28217530wrv.180.1563185807179; 
 Mon, 15 Jul 2019 03:16:47 -0700 (PDT)
MIME-Version: 1.0
From: Kamil Koczurek <kek@semihalf.com>
Date: Mon, 15 Jul 2019 12:16:36 +0200
Message-ID: <CANm5QM4AgL=TT2kXkqXe8YCtE=SZiuMhvbbtdFgZYKjEgeJWDg@mail.gmail.com>
Subject: bhyve fails on arm64 -- unknown exception type
To: freebsd-virtualization@freebsd.org
Content-Type: text/plain; charset="UTF-8"
X-Rspamd-Queue-Id: E054389759
X-Spamd-Bar: -----
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=semihalf-com.20150623.gappssmtp.com header.s=20150623
 header.b=RmZXSD3d
X-Spamd-Result: default: False [-5.92 / 15.00]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_DKIM_ALLOW(-0.20)[semihalf-com.20150623.gappssmtp.com:s=20150623];
 FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org];
 TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1];
 DMARC_NA(0.00)[semihalf.com];
 DKIM_TRACE(0.00)[semihalf-com.20150623.gappssmtp.com:+];
 MX_GOOD(-0.01)[ASPMX2.GOOGLEMAIL.com,ALT2.ASPMX.L.GOOGLE.com,ASPMX.L.GOOGLE.com,ALT1.ASPMX.L.GOOGLE.com,ASPMX3.GOOGLEMAIL.com,ASPMX2.GOOGLEMAIL.com,ALT2.ASPMX.L.GOOGLE.com,ASPMX.L.GOOGLE.com,ALT1.ASPMX.L.GOOGLE.com,ASPMX3.GOOGLEMAIL.com];
 RCVD_IN_DNSWL_NONE(0.00)[b.2.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org
 : 127.0.5.0]; NEURAL_HAM_SHORT(-0.66)[-0.658,0];
 R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[];
 MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[];
 ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US];
 RCVD_COUNT_TWO(0.00)[2];
 IP_SCORE(-2.96)[ip: (-9.39), ipnet: 2a00:1450::/32(-2.90), asn: 15169(-2.44),
 country: US(-0.06)]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Jul 2019 10:16:51 -0000

Hello,
I'm testing bhyve on an arm64 board, and it fails on a basic use case.

Setup:
  - board: EspressoBin
  - FreeBSD 13.0
(https://github.com/FreeBSD-UPB/freebsd/tree/projects/bhyvearm64-refactor)

Steps to reproduce:
  $ kldload vmm
  $ cd /boot/kernel
  $ bhyveload -k kernel guest
  $ bhyve guest

The following error appears almost instantly:
  `arm64_handle_world_switch:534 Unknown exception type: 1514243680`

After this, the board stops responding and requires a hard reset.
Debugger doesn't kick in either. It's not completely frozen though: I
can see new kernel messages regarding the attached usb drive.

I believe this might be interesting to people working on bhyve.

Ps. I can collect additional information if needed, feel free to
contact me either here or privately.

Respectfully,
Kamil Koczurek

From owner-freebsd-virtualization@freebsd.org  Mon Jul 15 10:41:29 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 046A0B6948
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Mon, 15 Jul 2019 10:41:29 +0000 (UTC)
 (envelope-from alexandru.elisei@gmail.com)
Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com
 [IPv6:2a00:1450:4864:20::543])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 267418A6AC
 for <freebsd-virtualization@freebsd.org>; Mon, 15 Jul 2019 10:41:28 +0000 (UTC)
 (envelope-from alexandru.elisei@gmail.com)
Received: by mail-ed1-x543.google.com with SMTP id w13so14985962eds.4
 for <freebsd-virtualization@freebsd.org>; Mon, 15 Jul 2019 03:41:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=Y6MWPZUfIJv55xeg6Quc/bzpoqhPbzpbOxeUhnKnZls=;
 b=Ik3J59gqe+68RBGBhJvlQ9U8lKiehqUaYM/+iUn9Ky4QbCkonH6TzTYmVneWio49by
 c2PondkkyvI0P03VCjw6FKbDdjNp0mV03IrUBAXOY/wyjVKolvF3lqq/Hf7ZIq+OPbSA
 ADu+7BXRYYDVCSCAOcItf2u7sIxvWz/x26xVKy4iOboOR4HJ+YZwUGqbUDKX5pOI++5f
 Ij9vl6791b6JbSbaxWG2twdTIqKQCCK7FoEmvi6d6lblsIvadtAmlaNZWqLjOc3z+Syt
 0WV8tYAE3k7nQk7ZaRto0BjJQZfayFJ1IrG3B/znb3mKdNSfa89pbzGHu4AVR1LjvXsL
 XrwQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=Y6MWPZUfIJv55xeg6Quc/bzpoqhPbzpbOxeUhnKnZls=;
 b=J9cX+5ObryysyOY8a82fx8fsgQNl6MioRFbSeWo4jyz4u99HDe/Ii8hlFG3U8hPA4e
 CejptvKHzR2EYRikmCSbQ7fNOBtsyu1xq5dHNRo3Gg2g2SkhwBMEXMfJN/PAwBlOOtQ6
 +rjSQKDERldfp45YlkedNh0EFw9P+B2ZkTJJHIVDp0oJ0rWFZnhbheAkMn2f7RX5Xxcb
 oYGuVENvLJ3r2ssiLApJsGUo3zxUgURMTZIG4IlxfaQmNHB4gJRdoztksOvvKShVO4W4
 /3EezEmciRg1BeWnRpKzCgBopuSJ5/YUP+tp3HR0WzB2PT6Udv4UQaMP2L+lQLmdHCtm
 6ZwA==
X-Gm-Message-State: APjAAAXLfLl7yPDwAkR60mCJa5C9iaN2aLuZXGhNgYQUPT1b74Nj9pfU
 YWLY+4WrKirHDBRqQpX66X4c/Q5qEBeJ1RuthLW29qY+cfc=
X-Google-Smtp-Source: APXvYqyTxo4zWbROLbThoSftNlXfeCTeAzq43d2MtKYAgDXDJidBPXlalSoe8hYbTxXJ8SzmnNzPhLU0nr/65KpTEh8=
X-Received: by 2002:a17:906:e95:: with SMTP id
 p21mr19531793ejf.205.1563187287079; 
 Mon, 15 Jul 2019 03:41:27 -0700 (PDT)
MIME-Version: 1.0
References: <CANm5QM4AgL=TT2kXkqXe8YCtE=SZiuMhvbbtdFgZYKjEgeJWDg@mail.gmail.com>
In-Reply-To: <CANm5QM4AgL=TT2kXkqXe8YCtE=SZiuMhvbbtdFgZYKjEgeJWDg@mail.gmail.com>
From: Alexandru Elisei <alexandru.elisei@gmail.com>
Date: Mon, 15 Jul 2019 11:41:16 +0100
Message-ID: <CAB-4s4=h-PXRn83duxna3DY=bJHhmgWnpRB0FMQDPVTjPz0XNw@mail.gmail.com>
Subject: Re: bhyve fails on arm64 -- unknown exception type
To: Kamil Koczurek <kek@semihalf.com>
Cc: freebsd-virtualization@freebsd.org
X-Rspamd-Queue-Id: 267418A6AC
X-Spamd-Bar: ----
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=gmail.com header.s=20161025 header.b=Ik3J59gq;
 dmarc=pass (policy=none) header.from=gmail.com;
 spf=pass (mx1.freebsd.org: domain of alexandruelisei@gmail.com designates
 2a00:1450:4864:20::543 as permitted sender)
 smtp.mailfrom=alexandruelisei@gmail.com
X-Spamd-Result: default: False [-4.86 / 15.00]; TO_DN_SOME(0.00)[];
 R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36];
 FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+];
 RCPT_COUNT_TWO(0.00)[2];
 DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
 MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com];
 NEURAL_HAM_SHORT(-0.75)[-0.754,0]; FROM_EQ_ENVFROM(0.00)[];
 RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+];
 FREEMAIL_ENVFROM(0.00)[gmail.com];
 ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US];
 TAGGED_FROM(0.00)[];
 DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0];
 ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 MIME_GOOD(-0.10)[multipart/alternative,text/plain];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org];
 TO_MATCH_ENVRCPT_SOME(0.00)[];
 RCVD_IN_DNSWL_NONE(0.00)[3.4.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org
 : 127.0.5.0]; 
 IP_SCORE(-1.09)[ip: (-0.07), ipnet: 2a00:1450::/32(-2.89), asn: 15169(-2.44),
 country: US(-0.06)]; RCVD_COUNT_TWO(0.00)[2]
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Jul 2019 10:41:29 -0000

Hello,

>From the error message and the symptoms you described, it looks like
something is broken with the world switch code.

Thank you for testing bhyve.

Regards,
Alex

On Mon, Jul 15, 2019 at 11:17 AM Kamil Koczurek <kek@semihalf.com> wrote:

> Hello,
> I'm testing bhyve on an arm64 board, and it fails on a basic use case.
>
> Setup:
>   - board: EspressoBin
>   - FreeBSD 13.0
> (https://github.com/FreeBSD-UPB/freebsd/tree/projects/bhyvearm64-refactor)
>
> Steps to reproduce:
>   $ kldload vmm
>   $ cd /boot/kernel
>   $ bhyveload -k kernel guest
>   $ bhyve guest
>
> The following error appears almost instantly:
>   `arm64_handle_world_switch:534 Unknown exception type: 1514243680`
>
> After this, the board stops responding and requires a hard reset.
> Debugger doesn't kick in either. It's not completely frozen though: I
> can see new kernel messages regarding the attached usb drive.
>
> I believe this might be interesting to people working on bhyve.
>
> Ps. I can collect additional information if needed, feel free to
> contact me either here or privately.
>
> Respectfully,
> Kamil Koczurek
> _______________________________________________
> freebsd-virtualization@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "
> freebsd-virtualization-unsubscribe@freebsd.org"
>

From owner-freebsd-virtualization@freebsd.org  Wed Jul 17 12:53:20 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0E40AC285
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Wed, 17 Jul 2019 12:53:20 +0000 (UTC)
 (envelope-from mihai.carabas@gmail.com)
Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com
 [IPv6:2a00:1450:4864:20::343])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 26233801E9
 for <freebsd-virtualization@freebsd.org>; Wed, 17 Jul 2019 12:53:20 +0000 (UTC)
 (envelope-from mihai.carabas@gmail.com)
Received: by mail-wm1-x343.google.com with SMTP id f17so22038254wme.2
 for <freebsd-virtualization@freebsd.org>; Wed, 17 Jul 2019 05:53:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=FxjLtdtQ/Frea2iHoe218rkj7hgusJFb6IM5pTgb4Fc=;
 b=E+QlFrHwX+HLk0CN/RocqbdjtvJgDPKCtPKuDU54J4SzqQmKmuVktNVLfooy/B1woy
 GNjGZNDQ9RkkzQk3dM5uOLVaydm2SH1x9OGtSWYRYZFcfVPPqiCAlUn6ld4MJV76LRQd
 MviAb+VbEEqEsAl8POwdNpvde7xOrJ+gFFGUbHexadnSjt2JWwp4jKMthpdI9tJJ+lnV
 D7nPlK/5S7a36PoXqTX2IBl1GlVhYYlNh9G0Tbw7TBAV7Off+ezSyYq8BCe+yKiIqzx6
 pkf0LwMYIOC3HBslsr2gFXAoDxcoSPnrdWmrcom7WieWbg3JM2TkcisvruLWoiBTCb8v
 rZ5A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=FxjLtdtQ/Frea2iHoe218rkj7hgusJFb6IM5pTgb4Fc=;
 b=pTaiBonVUWbheL0+UqHyAbStvH8jiWKxfRmtvAx8eqqhCiiWJDHwF0I2MZmlRsN2io
 1gzwKqwBo5eMzGNuz6QNIADYjOw/cd6j91gMh6ecfzKmk96xZHuohh3H3pCr6SNgepw0
 HfXMcmus89wASf53o8fzivfcg/oYSy0H2Rx551FuX1ylZzLRvbEJT2OJ3heBwdtgZA6O
 +U9co8v2Gc+xObp12vJr5SemA+MWrfSKPs1IhT3a0nrgUnP/dhfiefYYJaa8Zsq4tx1g
 auG+39IAZWrTyQ/k7QBRXfSd9GnJ4Qk3NrIrt//di1zROKOg2AERyOAnWIvjJGkw5QTt
 ksdQ==
X-Gm-Message-State: APjAAAWwcPdShADbLiMtG6YTJaJbsokgAHYOBQOlXONz/R87esE1hqC5
 lz1c+oKUREC3w9pQu95TqC8HM1nF6BnyqrCbjsE=
X-Google-Smtp-Source: APXvYqwkYoEeIdZWiWA2p2Re7RCkEa0MY0rWoKUF7ZDhCztKyDpbdepCdQdz+2N5aYDaEdnhvTl0FmIaMmiimzqVik8=
X-Received: by 2002:a1c:63c4:: with SMTP id x187mr34751220wmb.4.1563367999067; 
 Wed, 17 Jul 2019 05:53:19 -0700 (PDT)
MIME-Version: 1.0
References: <CANm5QM4AgL=TT2kXkqXe8YCtE=SZiuMhvbbtdFgZYKjEgeJWDg@mail.gmail.com>
 <CAB-4s4=h-PXRn83duxna3DY=bJHhmgWnpRB0FMQDPVTjPz0XNw@mail.gmail.com>
In-Reply-To: <CAB-4s4=h-PXRn83duxna3DY=bJHhmgWnpRB0FMQDPVTjPz0XNw@mail.gmail.com>
From: Mihai Carabas <mihai.carabas@gmail.com>
Date: Wed, 17 Jul 2019 16:12:22 +0300
Message-ID: <CANg1yUvWCr0YCnYYiogYs1ONdmCY_voo6TV3ViB035_fS+Ji=w@mail.gmail.com>
Subject: Re: bhyve fails on arm64 -- unknown exception type
To: Alexandru Elisei <alexandru.elisei@gmail.com>
Cc: Kamil Koczurek <kek@semihalf.com>, freebsd-virtualization@freebsd.org
Content-Type: text/plain; charset="UTF-8"
X-Rspamd-Queue-Id: 26233801E9
X-Spamd-Bar: ----
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=gmail.com header.s=20161025 header.b=E+QlFrHw;
 dmarc=pass (policy=none) header.from=gmail.com;
 spf=pass (mx1.freebsd.org: domain of mihaicarabas@gmail.com designates
 2a00:1450:4864:20::343 as permitted sender)
 smtp.mailfrom=mihaicarabas@gmail.com
X-Spamd-Result: default: False [-4.09 / 15.00]; TO_DN_SOME(0.00)[];
 R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36];
 FREEMAIL_FROM(0.00)[gmail.com];
 MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com];
 DKIM_TRACE(0.00)[gmail.com:+];
 DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
 NEURAL_HAM_SHORT(-0.59)[-0.587,0];
 FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[];
 RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+];
 FREEMAIL_ENVFROM(0.00)[gmail.com];
 ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US];
 TAGGED_FROM(0.00)[];
 DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0];
 ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.964,0];
 R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[];
 RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0];
 TAGGED_RCPT(0.00)[];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org];
 MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[];
 RCVD_IN_DNSWL_NONE(0.00)[3.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org
 : 127.0.5.0]; 
 IP_SCORE(-0.53)[ip: (2.77), ipnet: 2a00:1450::/32(-2.91), asn: 15169(-2.43),
 country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 17 Jul 2019 12:53:21 -0000

Hello Kamil,

We will try to look into that but probably from September. Now we are
engaged with reviewing save/restore and live migration.

Thank you for testing,
Mihai

On Mon, Jul 15, 2019 at 1:41 PM Alexandru Elisei
<alexandru.elisei@gmail.com> wrote:
>
> Hello,
>
> From the error message and the symptoms you described, it looks like
> something is broken with the world switch code.
>
> Thank you for testing bhyve.
>
> Regards,
> Alex
>
> On Mon, Jul 15, 2019 at 11:17 AM Kamil Koczurek <kek@semihalf.com> wrote:
>
> > Hello,
> > I'm testing bhyve on an arm64 board, and it fails on a basic use case.
> >
> > Setup:
> >   - board: EspressoBin
> >   - FreeBSD 13.0
> > (https://github.com/FreeBSD-UPB/freebsd/tree/projects/bhyvearm64-refactor)
> >
> > Steps to reproduce:
> >   $ kldload vmm
> >   $ cd /boot/kernel
> >   $ bhyveload -k kernel guest
> >   $ bhyve guest
> >
> > The following error appears almost instantly:
> >   `arm64_handle_world_switch:534 Unknown exception type: 1514243680`
> >
> > After this, the board stops responding and requires a hard reset.
> > Debugger doesn't kick in either. It's not completely frozen though: I
> > can see new kernel messages regarding the attached usb drive.
> >
> > I believe this might be interesting to people working on bhyve.
> >
> > Ps. I can collect additional information if needed, feel free to
> > contact me either here or privately.
> >
> > Respectfully,
> > Kamil Koczurek
> > _______________________________________________
> > freebsd-virtualization@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> > To unsubscribe, send any mail to "
> > freebsd-virtualization-unsubscribe@freebsd.org"
> >
> _______________________________________________
> freebsd-virtualization@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org"

From owner-freebsd-virtualization@freebsd.org  Thu Jul 18 19:50:14 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74FE5AFBCE
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Thu, 18 Jul 2019 19:50:14 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:13])
 by mx1.freebsd.org (Postfix) with ESMTP id 57D816F075
 for <freebsd-virtualization@freebsd.org>; Thu, 18 Jul 2019 19:50:14 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: by mailman.nyi.freebsd.org (Postfix)
 id 576F2AFBCD; Thu, 18 Jul 2019 19:50:14 +0000 (UTC)
Delivered-To: virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 572E3AFBCC
 for <virtualization@mailman.nyi.freebsd.org>;
 Thu, 18 Jul 2019 19:50:14 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 375966F073
 for <virtualization@FreeBSD.org>; Thu, 18 Jul 2019 19:50:14 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org (kenobi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:1d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23FE1CF45
 for <virtualization@FreeBSD.org>; Thu, 18 Jul 2019 19:50:14 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
 by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x6IJoEHo042744
 for <virtualization@FreeBSD.org>; Thu, 18 Jul 2019 19:50:14 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
 by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x6IJoExP042743
 for virtualization@FreeBSD.org; Thu, 18 Jul 2019 19:50:14 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to
 bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: virtualization@FreeBSD.org
Subject: [Bug 239118] in ESXi: Panic in ether_output_frame
Date: Thu, 18 Jul 2019 19:50:14 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: kern
X-Bugzilla-Version: 12.0-STABLE
X-Bugzilla-Keywords: iflib, panic
X-Bugzilla-Severity: Affects Some People
X-Bugzilla-Who: juraj@lutter.sk
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: virtualization@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: 
Message-ID: <bug-239118-27103-6fK7nZ2HSJ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-239118-27103@https.bugs.freebsd.org/bugzilla/>
References: <bug-239118-27103@https.bugs.freebsd.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-Rspamd-Queue-Id: 57D816F075
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.97 / 15.00];
 local_wl_from(0.00)[freebsd.org];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.97)[-0.973,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Jul 2019 19:50:14 -0000

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239118

--- Comment #2 from Juraj Lutter <juraj@lutter.sk> ---
Please! Has anyone had any chance to look at this? Thanks.

--=20
You are receiving this mail because:
You are the assignee for the bug.=

From owner-freebsd-virtualization@freebsd.org  Thu Jul 18 20:19:47 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20E6DB06CE
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Thu, 18 Jul 2019 20:19:47 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:13])
 by mx1.freebsd.org (Postfix) with ESMTP id F24F270298
 for <freebsd-virtualization@freebsd.org>; Thu, 18 Jul 2019 20:19:46 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: by mailman.nyi.freebsd.org (Postfix)
 id F1E5EB06CC; Thu, 18 Jul 2019 20:19:46 +0000 (UTC)
Delivered-To: virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1AD6B06CB
 for <virtualization@mailman.nyi.freebsd.org>;
 Thu, 18 Jul 2019 20:19:46 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id D01B170297
 for <virtualization@FreeBSD.org>; Thu, 18 Jul 2019 20:19:46 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org (kenobi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:1d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6D65D4F9
 for <virtualization@FreeBSD.org>; Thu, 18 Jul 2019 20:19:46 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
 by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x6IKJk21014422
 for <virtualization@FreeBSD.org>; Thu, 18 Jul 2019 20:19:46 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
 by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x6IKJk3H014421
 for virtualization@FreeBSD.org; Thu, 18 Jul 2019 20:19:46 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to
 bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: virtualization@FreeBSD.org
Subject: [Bug 239118] in ESXi: Panic in ether_output_frame
Date: Thu, 18 Jul 2019 20:19:45 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: kern
X-Bugzilla-Version: 12.0-STABLE
X-Bugzilla-Keywords: iflib, panic
X-Bugzilla-Severity: Affects Some People
X-Bugzilla-Who: markj@FreeBSD.org
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: virtualization@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-239118-27103-xFC44RetIy@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-239118-27103@https.bugs.freebsd.org/bugzilla/>
References: <bug-239118-27103@https.bugs.freebsd.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-Rspamd-Queue-Id: F24F270298
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[freebsd.org];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.98)[-0.982,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Jul 2019 20:19:47 -0000

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239118

--- Comment #3 from Mark Johnston <markj@FreeBSD.org> ---
Created attachment 205876
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D205876&action=
=3Dedit
proposed patch

Based on the line numbers, vmxnet3_isc_txd_credits_update() is being reente=
red.
 I think there is a window where vxcr_next is an invalid queue index; if we
take an interrupt during that window, we may reference invalid memory.

Please try the attached patch, which attempts to bandage the problem.

--=20
You are receiving this mail because:
You are the assignee for the bug.=

From owner-freebsd-virtualization@freebsd.org  Thu Jul 18 22:41:28 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B8D4B33B7
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Thu, 18 Jul 2019 22:41:28 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3])
 by mx1.freebsd.org (Postfix) with ESMTP id 3BC2D75058
 for <freebsd-virtualization@freebsd.org>; Thu, 18 Jul 2019 22:41:28 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: by mailman.nyi.freebsd.org (Postfix)
 id 3B57FB33B6; Thu, 18 Jul 2019 22:41:28 +0000 (UTC)
Delivered-To: virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B1B9B33B5
 for <virtualization@mailman.nyi.freebsd.org>;
 Thu, 18 Jul 2019 22:41:28 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 1F10D75057
 for <virtualization@FreeBSD.org>; Thu, 18 Jul 2019 22:41:28 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org (kenobi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:1d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFB7EF170
 for <virtualization@FreeBSD.org>; Thu, 18 Jul 2019 22:41:27 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
 by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x6IMfRcu033727
 for <virtualization@FreeBSD.org>; Thu, 18 Jul 2019 22:41:27 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
 by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x6IMfRIA033726
 for virtualization@FreeBSD.org; Thu, 18 Jul 2019 22:41:27 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to
 bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: virtualization@FreeBSD.org
Subject: [Bug 239118] in ESXi: Panic in ether_output_frame
Date: Thu, 18 Jul 2019 22:41:28 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: kern
X-Bugzilla-Version: 12.0-STABLE
X-Bugzilla-Keywords: iflib, panic
X-Bugzilla-Severity: Affects Some People
X-Bugzilla-Who: pkelsey@freebsd.org
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: virtualization@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: 
Message-ID: <bug-239118-27103-idxJQmByeN@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-239118-27103@https.bugs.freebsd.org/bugzilla/>
References: <bug-239118-27103@https.bugs.freebsd.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-Rspamd-Queue-Id: 1F10D75057
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.99 / 15.00];
 local_wl_from(0.00)[freebsd.org];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.99)[-0.987,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Jul 2019 22:41:28 -0000

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239118

--- Comment #4 from Patrick Kelsey <pkelsey@freebsd.org> ---
(In reply to Mark Johnston from comment #3)
> Created attachment 205876 [details]
> proposed patch
>=20
> Based on the line numbers, vmxnet3_isc_txd_credits_update() is being
> reentered.  I think there is a window where vxcr_next is an invalid queue
> index; if we take an interrupt during that window, we may reference inval=
id
> memory.
>=20
> Please try the attached patch, which attempts to bandage the problem.

The problem isn't that vmxnet3_isc_txd_credits_update() needs to be
re-enterable, the problem is that r347221 (merged to stable/12 in r349112)
changed iflib_legacy_setup() in a way that assumes that all iflib drivers
operate their interrupts in combined RXTX mode.  The vmx driver is one such
driver that does not.  For vmx, this change results in access to the tx sta=
te
from multiple contexts (interrupt and group task context) whereas the tx st=
ate
management is designed to only be accessed from a single context (group task
context).

iflib_legacy_setup() needs to be fixed.

--=20
You are receiving this mail because:
You are the assignee for the bug.=

From owner-freebsd-virtualization@freebsd.org  Fri Jul 19 00:04:03 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15494B4B61
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Fri, 19 Jul 2019 00:04:03 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:13])
 by mx1.freebsd.org (Postfix) with ESMTP id EB2DE77C21
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 00:04:02 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: by mailman.nyi.freebsd.org (Postfix)
 id EA91EB4B60; Fri, 19 Jul 2019 00:04:02 +0000 (UTC)
Delivered-To: virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA4C9B4B5F
 for <virtualization@mailman.nyi.freebsd.org>;
 Fri, 19 Jul 2019 00:04:02 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id CC54C77C20
 for <virtualization@FreeBSD.org>; Fri, 19 Jul 2019 00:04:02 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org (kenobi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:1d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A478C1823B
 for <virtualization@FreeBSD.org>; Fri, 19 Jul 2019 00:04:02 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
 by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x6J042mU044847
 for <virtualization@FreeBSD.org>; Fri, 19 Jul 2019 00:04:02 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
 by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x6J042gD044833
 for virtualization@FreeBSD.org; Fri, 19 Jul 2019 00:04:02 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to
 bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: virtualization@FreeBSD.org
Subject: [Bug 239118] in ESXi: Panic in ether_output_frame
Date: Fri, 19 Jul 2019 00:04:02 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: kern
X-Bugzilla-Version: 12.0-STABLE
X-Bugzilla-Keywords: iflib, panic
X-Bugzilla-Severity: Affects Some People
X-Bugzilla-Who: markj@FreeBSD.org
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: virtualization@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-239118-27103-GFNy3HwnNv@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-239118-27103@https.bugs.freebsd.org/bugzilla/>
References: <bug-239118-27103@https.bugs.freebsd.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-Rspamd-Queue-Id: EB2DE77C21
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.99 / 15.00];
 local_wl_from(0.00)[freebsd.org];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.99)[-0.988,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jul 2019 00:04:03 -0000

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239118

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marius@FreeBSD.org

--- Comment #5 from Mark Johnston <markj@FreeBSD.org> ---
(In reply to Patrick Kelsey from comment #4)
Marius, could you take a look at this?

--=20
You are receiving this mail because:
You are the assignee for the bug.=

From owner-freebsd-virtualization@freebsd.org  Fri Jul 19 02:53:46 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1553CB7453
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Fri, 19 Jul 2019 02:53:46 +0000 (UTC)
 (envelope-from pete@nomadlogic.org)
Received: from mail.nomadlogic.org (mail.nomadlogic.org [174.136.98.114])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mail.nomadlogic.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 91BD983A32
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 02:53:44 +0000 (UTC)
 (envelope-from pete@nomadlogic.org)
Received: from [192.168.1.206] (cpe-23-243-162-239.socal.res.rr.com
 [23.243.162.239])
 by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id 231fb6d8
 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO
 for <freebsd-virtualization@freebsd.org>;
 Fri, 19 Jul 2019 02:53:42 +0000 (UTC)
Subject: Re: Custom Qcow2 Images
To: freebsd-virtualization@freebsd.org
References: <459c53d0-f00b-6ce3-dfab-de3ddac1c0bb@nomadlogic.org>
From: Pete Wright <pete@nomadlogic.org>
Message-ID: <95a027df-46c3-24ba-8acd-ddb24579885e@nomadlogic.org>
Date: Thu, 18 Jul 2019 19:53:42 -0700
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101
 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <459c53d0-f00b-6ce3-dfab-de3ddac1c0bb@nomadlogic.org>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Rspamd-Queue-Id: 91BD983A32
X-Spamd-Bar: +++
Authentication-Results: mx1.freebsd.org;
 spf=pass (mx1.freebsd.org: domain of pete@nomadlogic.org designates
 174.136.98.114 as permitted sender) smtp.mailfrom=pete@nomadlogic.org
X-Spamd-Result: default: False [3.37 / 15.00]; ARC_NA(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_LONG(-0.06)[-0.064,0];
 FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(0.00)[+mx];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org];
 TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(0.67)[0.670,0];
 RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[];
 DMARC_NA(0.00)[nomadlogic.org];
 MX_GOOD(-0.01)[cached: mail.nomadlogic.org];
 NEURAL_HAM_SHORT(-0.90)[-0.902,0]; URIBL_SBL(6.50)[bsdrp.net];
 IP_SCORE(-2.83)[ip: (-9.25), ipnet: 174.136.96.0/20(-4.56), asn: 25795(-0.27),
 country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[];
 R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:25795, ipnet:174.136.96.0/20, country:US];
 MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[];
 RCVD_COUNT_TWO(0.00)[2]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jul 2019 02:53:46 -0000


On 7/14/19 4:37 PM, Pete Wright wrote:
> Hey there folks,
> I am wondering if anyone has any pointers on creating a custom Qcow2 
> FreeBSD that is akin in size to nanobsd.  I have an environment where 
> we need to run a single binary and want to keep our disk image as 
> small as possible.  It will run inside a user-mode Qemu process.  
> Reading through the nanobsd script it seems that it expects a raw disk 
> for installation, so I do think using the nanobsd script itself well 
> work well.  Has anyone else done something similar?  My goal is to 
> have a disk image that is around 500MB.
>
> Thanks in advance!
> -pete
>


I wanted to close the loop on this discussion as I think I've found a 
workable solution for my use-case.  I'm using a three step process:

1) generate a raw disk image using "poudriere image".  This phase 
references a Jail I've built that has disabled lots of uneeded features 
as per the docs here:
https://bsdrp.net/documentation/technical_docs/poudriere

2) next I use mkimg(1) to convert the raw disk image to a bootable qcow2 
image that I can boot from Qemu.  this results in a disk image that's 
about 800MB.

3) the final phase is to use qemu-img to create a compressed qcow2 
image.  the resulting artifact of that process is a ~325MB Qcow2 
diskimage that actually has decent performance (on my SSD backed zfs 
filesystem).

I attempted to use poudriere image to generate a usb image directly, and 
while that did work well sizing wise i ran into an issue where 
insufficient inodes were allocated.  I reference what I ran into in this 
github issue:
https://github.com/freebsd/poudriere/issues/701

For me this current setup is fine for my purposes, although I'm sure 
others can optimize this workflow a bit :)

Also, thanks again Allan and Dave Cottlehuber (who pinged me offlist) 
for giving me some hints and pointing me in the right direction!

Cheers,
-pete

-- 
Pete Wright
pete@nomadlogic.org
@nomadlogicLA


From owner-freebsd-virtualization@freebsd.org  Fri Jul 19 10:02:16 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EF8EBE079
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Fri, 19 Jul 2019 10:02:16 +0000 (UTC)
 (envelope-from henrik@gulbra.net)
Received: from srv.gulbra.net (ec2-174-129-193-206.compute-1.amazonaws.com
 [174.129.193.206])
 by mx1.freebsd.org (Postfix) with ESMTP id 78A548EA79
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 10:02:15 +0000 (UTC)
 (envelope-from henrik@gulbra.net)
Received: from srv.gulbra.net (localhost [127.0.0.1])
 by srv.gulbra.net (Postfix) with ESMTP id 7E43AE1
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 10:02:14 +0000 (UTC)
Received: by srv.gulbra.net (Postfix, from userid 33)
 id 4AA1AF8; Fri, 19 Jul 2019 10:02:14 +0000 (UTC)
To: FreeBSD Virtualization <freebsd-virtualization@freebsd.org>
Subject: New video BIOS for bhyve
X-PHP-Originating-Script: 0:rcube.php
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Fri, 19 Jul 2019 12:02:14 +0200
From: Henrik Gulbrandsen <henrik@gulbra.net>
Message-ID: <ea5e9e82398c7cece09ebdd6f3551d31@www.gulbra.net>
X-Sender: henrik@gulbra.net
User-Agent: Roundcube Webmail/1.2-beta
X-Rspamd-Queue-Id: 78A548EA79
X-Spamd-Bar: /
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-0.99 / 15.00]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-0.88)[-0.875,0]; FROM_HAS_DN(0.00)[];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.995,0];
 HAS_X_POS(0.00)[];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org];
 DMARC_NA(0.00)[gulbra.net]; MIME_GOOD(-0.10)[text/plain];
 RCPT_COUNT_ONE(0.00)[1]; AUTH_NA(1.00)[];
 RCVD_COUNT_THREE(0.00)[3]; PHP_SCRIPT_ROOT(1.00)[];
 TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: srv.gulbra.net];
 NEURAL_HAM_SHORT(-0.95)[-0.946,0]; R_SPF_NA(0.00)[];
 RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[];
 R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:14618, ipnet:174.129.0.0/16, country:US];
 IP_SCORE(-0.66)[asn: 14618(-3.25), country: US(-0.05)];
 MID_RHS_WWW(0.50)[]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jul 2019 10:02:16 -0000

In the last few months, I have been extending the video support in bhyve
to allow booting from live ISO images, which sometimes lack UEFI 
loaders.
There was already a video BIOS with dormant support for VGA, but I could
not use that, because the X11 int10 module runs a real-mode x86 emulator
that aborts when it tries to enter the C code running in protected mode.

Instead, I added support for PCI Expansion ROMs to bhyve and wrote a new
SVGA video BIOS from scratch in 8086 assembly code. The current features
include VGA modes 3 and 12h, 24-bit and 32-bit VESA modes from 640x480 
to
1920x1200, and enough BIOS functions to boot a typical Linux desktop.

At this point, I think it's good enough for a preliminary release, so if
you are interested, you will find all patch files at the following URL:

     https://www.gulbra.net/freebsd-bhyve/

My apologies for the 15-year-old web layout, which will probably break
horribly on modern smartphones. Also, I hope I have not duplicated the
work of someone else. I didn't want to announce this before it worked.

/Henrik


From owner-freebsd-virtualization@freebsd.org  Fri Jul 19 10:43:55 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 208A1BEB62
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Fri, 19 Jul 2019 10:43:55 +0000 (UTC)
 (envelope-from manu@bidouilliste.com)
Received: from mail.blih.net (mail.blih.net [212.83.177.182])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id 5DC528F957
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 10:43:54 +0000 (UTC)
 (envelope-from manu@bidouilliste.com)
Received: from mail.blih.net (mail.blih.net [212.83.177.182])
 by mail.blih.net (OpenSMTPD) with ESMTP id 4b52e52e;
 Fri, 19 Jul 2019 12:37:12 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date
 :from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-type:content-transfer-encoding; s=mail;
 bh=y1MvGSWwQ+Uaaaqx7dHnaMSsIgM=; b=rXuq+XZfOl6J1au0rlz65aTmL2zA
 n7jxpIW3k1TrpVPD2Xh733v3Auq3a4NNFVCcln+gCxQN5UGHohLbFEBlBOQ55G8n
 yc3RvTZ5mTBL7Jz6rndzOJVc1gaQcxnXYVXryfZzN1qctqyNj/rXCsLA1HvkQuWO
 7Qe28EPQFkcpMAY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date
 :from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-type:content-transfer-encoding; q=dns; s=
 mail; b=R3uSRVxVvSECXrW4SOo6IkgztuU7euSw52zif/pWbGKwrZshGk0pAnc8
 B6j7k4/5Pv586B7hBT/qutRdWk/JZML128e3Qj0sUxW035CGcGHwXLFAYEs9DDR2
 aYHx0VR3Eb8bN00n8K8CrCqh033XBXVsUvXbkAVV34MFjG5MZac=
Received: from knuckles.blih.net (ip-9.net-89-3-105.rev.numericable.fr
 [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id b45bbb9a
 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO;
 Fri, 19 Jul 2019 12:37:11 +0200 (CEST)
Date: Fri, 19 Jul 2019 12:37:08 +0200
From: Emmanuel Vadot <manu@bidouilliste.com>
To: Pete Wright <pete@nomadlogic.org>
Cc: freebsd-virtualization@freebsd.org
Subject: Re: Custom Qcow2 Images
Message-Id: <20190719123708.de3ac7c0041a7c356080fa7b@bidouilliste.com>
In-Reply-To: <95a027df-46c3-24ba-8acd-ddb24579885e@nomadlogic.org>
References: <459c53d0-f00b-6ce3-dfab-de3ddac1c0bb@nomadlogic.org>
 <95a027df-46c3-24ba-8acd-ddb24579885e@nomadlogic.org>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Rspamd-Queue-Id: 5DC528F957
X-Spamd-Bar: ++++++++
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=bidouilliste.com header.s=mail header.b=rXuq+XZf;
 spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates
 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com
X-Spamd-Result: default: False [8.92 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[];
 TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:212.83.177.182/32];
 MV_CASE(0.50)[]; DKIM_TRACE(0.00)[bidouilliste.com:+];
 RCPT_COUNT_TWO(0.00)[2];
 MX_GOOD(-0.01)[cached: mx-backup.blih.net];
 NEURAL_HAM_SHORT(-0.43)[-0.430,0]; RCVD_NO_TLS_LAST(0.10)[];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
 IP_SCORE(0.26)[ip: (-1.05), ipnet: 212.83.160.0/19(2.65), asn: 12876(-0.28),
 country: FR(-0.01)]; 
 ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR];
 MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[];
 R_DKIM_ALLOW(0.00)[bidouilliste.com:s=mail];
 FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain];
 DMARC_NA(0.00)[bidouilliste.com];
 NEURAL_SPAM_MEDIUM(1.00)[1.000,0]; BAD_REP_POLICIES(0.10)[];
 TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0];
 URIBL_SBL(6.50)[bsdrp.net]; RCVD_COUNT_TWO(0.00)[2];
 GREYLIST(0.00)[pass,body]
X-Spam: Yes
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jul 2019 10:43:55 -0000


 Hi Pete,

On Thu, 18 Jul 2019 19:53:42 -0700
Pete Wright <pete@nomadlogic.org> wrote:

>=20
> On 7/14/19 4:37 PM, Pete Wright wrote:
> > Hey there folks,
> > I am wondering if anyone has any pointers on creating a custom Qcow2=20
> > FreeBSD that is akin in size to nanobsd.=A0 I have an environment where=
=20
> > we need to run a single binary and want to keep our disk image as=20
> > small as possible.=A0 It will run inside a user-mode Qemu process.=A0=20
> > Reading through the nanobsd script it seems that it expects a raw disk=
=20
> > for installation, so I do think using the nanobsd script itself well=20
> > work well.=A0 Has anyone else done something similar?=A0 My goal is to=
=20
> > have a disk image that is around 500MB.
> >
> > Thanks in advance!
> > -pete
> >
>=20
>=20
> I wanted to close the loop on this discussion as I think I've found a=20
> workable solution for my use-case.=A0 I'm using a three step process:
>=20
> 1) generate a raw disk image using "poudriere image".=A0 This phase=20
> references a Jail I've built that has disabled lots of uneeded features=20
> as per the docs here:
> https://bsdrp.net/documentation/technical_docs/poudriere
>=20
> 2) next I use mkimg(1) to convert the raw disk image to a bootable qcow2=
=20
> image that I can boot from Qemu.=A0 this results in a disk image that's=20
> about 800MB.
>=20
> 3) the final phase is to use qemu-img to create a compressed qcow2=20
> image.=A0 the resulting artifact of that process is a ~325MB Qcow2=20
> diskimage that actually has decent performance (on my SSD backed zfs=20
> filesystem).
>=20
> I attempted to use poudriere image to generate a usb image directly, and=
=20
> while that did work well sizing wise i ran into an issue where=20
> insufficient inodes were allocated.=A0 I reference what I ran into in thi=
s=20
> github issue:
> https://github.com/freebsd/poudriere/issues/701

 This is a problem with makefs, I don't recall the details but even
when using -f to ensure that a minimum of free inode were present I had
problems, I'll try to find my notes on this.
 Using rawdisk this uses mdconfig/newfs so you don't have inodes
problems.

> For me this current setup is fine for my purposes, although I'm sure=20
> others can optimize this workflow a bit :)

 I won't be against you adding qcow2 support in poudriere image :)

> Also, thanks again Allan and Dave Cottlehuber (who pinged me offlist)=20
> for giving me some hints and pointing me in the right direction!
>=20
> Cheers,
> -pete
>=20
> --=20
> Pete Wright
> pete@nomadlogic.org
> @nomadlogicLA
>=20
> _______________________________________________
> freebsd-virtualization@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@free=
bsd.org"


--=20
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

From owner-freebsd-virtualization@freebsd.org  Fri Jul 19 12:48:33 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6DDC4A2066
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Fri, 19 Jul 2019 12:48:33 +0000 (UTC)
 (envelope-from crowston@protonmail.com)
Received: from mail4.protonmail.ch (mail4.protonmail.ch [185.70.40.27])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "*.protonmail.ch",
 Issuer "SwissSign Server Silver CA 2014 - G22" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id D25286C0BE
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 12:48:31 +0000 (UTC)
 (envelope-from crowston@protonmail.com)
Date: Fri, 19 Jul 2019 12:48:21 +0000
To: Henrik Gulbrandsen <henrik@gulbra.net>,
 FreeBSD Virtualization <freebsd-virtualization@freebsd.org>
From: Robert Crowston <crowston@protonmail.com>
Reply-To: Robert Crowston <crowston@protonmail.com>
Subject: Re: New video BIOS for bhyve
Message-ID: <jHea1xh7utpIszJ8iFyjh_dU-VD98Ch8LBbQ-pH_mLv5vulK2Wwj8J1jqxL5liRBcnY7ML56QGEWE7Y9bpFgCJ9lXAmhsM41iFSMJKO7sCg=@protonmail.com>
In-Reply-To: <ea5e9e82398c7cece09ebdd6f3551d31@www.gulbra.net>
References: <ea5e9e82398c7cece09ebdd6f3551d31@www.gulbra.net>
Feedback-ID: 2OVbcR1yHYpdkD8cgQllkFwcuMVZg_LiVMMPvptooFDfHD_03MuQO4ZaF626jWHZYFEhNR2cmIbZ53j4QGWMBQ==:Ext:ProtonMail
MIME-Version: 1.0
X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE
 autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.protonmail.ch
X-Rspamd-Queue-Id: D25286C0BE
X-Spamd-Bar: -------
X-Spamd-Result: default: False [-7.74 / 15.00];
 HAS_REPLYTO(0.00)[crowston@protonmail.com];
 R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24];
 FREEMAIL_FROM(0.00)[protonmail.com]; TO_DN_ALL(0.00)[];
 DKIM_TRACE(0.00)[protonmail.com:+];
 DMARC_POLICY_ALLOW(-0.50)[protonmail.com,quarantine];
 RCPT_COUNT_TWO(0.00)[2];
 MX_GOOD(-0.01)[mailsec.protonmail.ch,mail.protonmail.ch];
 MIME_BASE64_TEXT(0.10)[]; NEURAL_HAM_SHORT(-0.99)[-0.987,0];
 RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[];
 MIME_TRACE(0.00)[0:+,1:+];
 FREEMAIL_ENVFROM(0.00)[protonmail.com];
 RCVD_IN_DNSWL_LOW(-0.10)[27.40.70.185.list.dnswl.org : 127.0.5.1];
 ASN(0.00)[asn:19905, ipnet:185.70.40.0/24, country:US];
 MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_DKIM_ALLOW(-0.20)[protonmail.com:s=default];
 REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 MIME_GOOD(-0.10)[multipart/alternative,text/plain];
 HAS_PHPMAILER_SIG(0.00)[];
 FREEMAIL_REPLYTO(0.00)[protonmail.com];
 TO_MATCH_ENVRCPT_SOME(0.00)[];
 IP_SCORE(-3.74)[ip: (-9.85), ipnet: 185.70.40.0/24(-4.90), asn: 19905(-3.91),
 country: US(-0.05)]; RCVD_TLS_ALL(0.00)[]
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jul 2019 12:48:33 -0000

RmFudGFzdGljIQoKPiBJbnN0ZWFkLCBJIGFkZGVkIHN1cHBvcnQgZm9yIFBDSSBFeHBhbnNpb24g
Uk9NcwoKVGhpcyB3YXMgb25lIG9mIHRoZSBsaW1pdGF0aW9uIHRoYXQgcHJldmVudHMgR1BVIHBh
c3MgdGhyb3VnaCBmcm9tIHdvcmtpbmcsIHNvIHRoaXMgaXMgYWxzbyBhIGJpZyBzdGVwIGZvcndh
cmRzLgoKT24gRnJpLCBKdWwgMTksIDIwMTkgYXQgMTE6MDIsIEhlbnJpayBHdWxicmFuZHNlbiA8
aGVucmlrQGd1bGJyYS5uZXQ+IHdyb3RlOgoKPiBJbiB0aGUgbGFzdCBmZXcgbW9udGhzLCBJIGhh
dmUgYmVlbiBleHRlbmRpbmcgdGhlIHZpZGVvIHN1cHBvcnQgaW4gYmh5dmUKPiB0byBhbGxvdyBi
b290aW5nIGZyb20gbGl2ZSBJU08gaW1hZ2VzLCB3aGljaCBzb21ldGltZXMgbGFjayBVRUZJCj4g
bG9hZGVycy4KPiBUaGVyZSB3YXMgYWxyZWFkeSBhIHZpZGVvIEJJT1Mgd2l0aCBkb3JtYW50IHN1
cHBvcnQgZm9yIFZHQSwgYnV0IEkgY291bGQKPiBub3QgdXNlIHRoYXQsIGJlY2F1c2UgdGhlIFgx
MSBpbnQxMCBtb2R1bGUgcnVucyBhIHJlYWwtbW9kZSB4ODYgZW11bGF0b3IKPiB0aGF0IGFib3J0
cyB3aGVuIGl0IHRyaWVzIHRvIGVudGVyIHRoZSBDIGNvZGUgcnVubmluZyBpbiBwcm90ZWN0ZWQg
bW9kZS4KPgo+IEluc3RlYWQsIEkgYWRkZWQgc3VwcG9ydCBmb3IgUENJIEV4cGFuc2lvbiBST01z
IHRvIGJoeXZlIGFuZCB3cm90ZSBhIG5ldwo+IFNWR0EgdmlkZW8gQklPUyBmcm9tIHNjcmF0Y2gg
aW4gODA4NiBhc3NlbWJseSBjb2RlLiBUaGUgY3VycmVudCBmZWF0dXJlcwo+IGluY2x1ZGUgVkdB
IG1vZGVzIDMgYW5kIDEyaCwgMjQtYml0IGFuZCAzMi1iaXQgVkVTQSBtb2RlcyBmcm9tIDY0MHg0
ODAKPiB0bwo+IDE5MjB4MTIwMCwgYW5kIGVub3VnaCBCSU9TIGZ1bmN0aW9ucyB0byBib290IGEg
dHlwaWNhbCBMaW51eCBkZXNrdG9wLgo+Cj4gQXQgdGhpcyBwb2ludCwgSSB0aGluayBpdCdzIGdv
b2QgZW5vdWdoIGZvciBhIHByZWxpbWluYXJ5IHJlbGVhc2UsIHNvIGlmCj4geW91IGFyZSBpbnRl
cmVzdGVkLCB5b3Ugd2lsbCBmaW5kIGFsbCBwYXRjaCBmaWxlcyBhdCB0aGUgZm9sbG93aW5nIFVS
TDoKPgo+IGh0dHBzOi8vd3d3Lmd1bGJyYS5uZXQvZnJlZWJzZC1iaHl2ZS8KPgo+IE15IGFwb2xv
Z2llcyBmb3IgdGhlIDE1LXllYXItb2xkIHdlYiBsYXlvdXQsIHdoaWNoIHdpbGwgcHJvYmFibHkg
YnJlYWsKPiBob3JyaWJseSBvbiBtb2Rlcm4gc21hcnRwaG9uZXMuIEFsc28sIEkgaG9wZSBJIGhh
dmUgbm90IGR1cGxpY2F0ZWQgdGhlCj4gd29yayBvZiBzb21lb25lIGVsc2UuIEkgZGlkbid0IHdh
bnQgdG8gYW5ub3VuY2UgdGhpcyBiZWZvcmUgaXQgd29ya2VkLgo+Cj4gL0hlbnJpawo+Cj4gX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KPiBmcmVlYnNkLXZp
cnR1YWxpemF0aW9uQGZyZWVic2Qub3JnIG1haWxpbmcgbGlzdAo+IGh0dHBzOi8vbGlzdHMuZnJl
ZWJzZC5vcmcvbWFpbG1hbi9saXN0aW5mby9mcmVlYnNkLXZpcnR1YWxpemF0aW9uCj4gVG8gdW5z
dWJzY3JpYmUsIHNlbmQgYW55IG1haWwgdG8gImZyZWVic2QtdmlydHVhbGl6YXRpb24tdW5zdWJz
Y3JpYmVAZnJlZWJzZC5vcmci


From owner-freebsd-virtualization@freebsd.org  Fri Jul 19 14:17:15 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9319EA3BC8
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Fri, 19 Jul 2019 14:17:15 +0000 (UTC)
 (envelope-from pete@nomadlogic.org)
Received: from mail.nomadlogic.org (mail.nomadlogic.org [174.136.98.114])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mail.nomadlogic.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 5BD8B6F41E
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 14:17:14 +0000 (UTC)
 (envelope-from pete@nomadlogic.org)
Received: from creek.local (cpe-23-243-162-239.socal.res.rr.com
 [23.243.162.239])
 by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id 05821c71
 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO;
 Fri, 19 Jul 2019 14:17:13 +0000 (UTC)
Subject: Re: Custom Qcow2 Images
To: Emmanuel Vadot <manu@bidouilliste.com>
Cc: freebsd-virtualization@freebsd.org
References: <459c53d0-f00b-6ce3-dfab-de3ddac1c0bb@nomadlogic.org>
 <95a027df-46c3-24ba-8acd-ddb24579885e@nomadlogic.org>
 <20190719123708.de3ac7c0041a7c356080fa7b@bidouilliste.com>
From: Pete Wright <pete@nomadlogic.org>
Message-ID: <0f093aad-2a03-a34b-646a-b0c279c55571@nomadlogic.org>
Date: Fri, 19 Jul 2019 07:17:12 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0)
 Gecko/20100101 Thunderbird/60.7.2
MIME-Version: 1.0
In-Reply-To: <20190719123708.de3ac7c0041a7c356080fa7b@bidouilliste.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Language: en-US
X-Rspamd-Queue-Id: 5BD8B6F41E
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org;
 spf=pass (mx1.freebsd.org: domain of pete@nomadlogic.org designates
 174.136.98.114 as permitted sender) smtp.mailfrom=pete@nomadlogic.org
X-Spamd-Result: default: False [-6.08 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[];
 TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx];
 MX_GOOD(-0.01)[cached: mail.nomadlogic.org];
 RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.94)[-0.935,0];
 FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[];
 MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:25795, ipnet:174.136.96.0/20, country:US];
 MID_RHS_MATCH_FROM(0.00)[];
 RECEIVED_SPAMHAUS_PBL(0.00)[239.162.243.23.zen.spamhaus.org : 127.0.0.10];
 ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0];
 MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[nomadlogic.org];
 TO_MATCH_ENVRCPT_SOME(0.00)[];
 IP_SCORE(-2.84)[ip: (-9.27), ipnet: 174.136.96.0/20(-4.57), asn: 25795(-0.28),
 country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2];
 RCVD_TLS_ALL(0.00)[]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jul 2019 14:17:15 -0000


On 7/19/19 3:37 AM, Emmanuel Vadot wrote:
>
>> For me this current setup is fine for my purposes, although I'm sure 
>> others can optimize this workflow a bit :)
>  I won't be against you adding qcow2 support in poudriere image :)

nice - i'll take a swing at this this weekend hopefully :)


-pete

-- 
Pete Wright
pete@nomadlogic.org
310.309.9298


From owner-freebsd-virtualization@freebsd.org  Fri Jul 19 14:43:23 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56036A453A
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Fri, 19 Jul 2019 14:43:23 +0000 (UTC)
 (envelope-from mgrooms@shrew.net)
Received: from mx2.shrew.net (mx2.shrew.net [38.97.5.132])
 (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 52FBD706C1
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 14:43:22 +0000 (UTC)
 (envelope-from mgrooms@shrew.net)
Received: from mail.shrew.net (mail.shrew.prv [10.24.10.20])
 by mx2.shrew.net (8.15.2/8.15.2) with ESMTP id x6JEhK1K041041
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 09:43:20 -0500 (CDT)
 (envelope-from mgrooms@shrew.net)
Received: from [10.16.32.30] (unknown [172.126.77.65])
 by mail.shrew.net (Postfix) with ESMTPSA id 87286195EB4
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 09:43:15 -0500 (CDT)
Subject: Re: New video BIOS for bhyve
To: freebsd-virtualization@freebsd.org
References: <ea5e9e82398c7cece09ebdd6f3551d31@www.gulbra.net>
From: Matthew Grooms <mgrooms@shrew.net>
Message-ID: <d7dd8790-6e3b-467a-626b-031adc3ad435@shrew.net>
Date: Fri, 19 Jul 2019 09:43:14 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <ea5e9e82398c7cece09ebdd6f3551d31@www.gulbra.net>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2
 (mx2.shrew.net [10.24.10.11]); Fri, 19 Jul 2019 09:43:20 -0500 (CDT)
X-Rspamd-Queue-Id: 52FBD706C1
X-Spamd-Bar: ----
Authentication-Results: mx1.freebsd.org;
 spf=pass (mx1.freebsd.org: domain of mgrooms@shrew.net designates 38.97.5.132
 as permitted sender) smtp.mailfrom=mgrooms@shrew.net
X-Spamd-Result: default: False [-4.23 / 15.00]; ARC_NA(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org];
 TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3];
 RCVD_TLS_LAST(0.00)[]; MX_GOOD(-0.01)[cached: mx1.shrew.net];
 NEURAL_HAM_SHORT(-0.92)[-0.924,0];
 RCVD_IN_DNSWL_NONE(0.00)[132.5.97.38.list.dnswl.org : 127.0.10.0];
 IP_SCORE(-1.00)[ip: (-9.53), ipnet: 38.0.0.0/8(2.82), asn: 174(1.77), country:
 US(-0.05)]; DMARC_NA(0.00)[shrew.net]; FROM_EQ_ENVFROM(0.00)[];
 R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:174, ipnet:38.0.0.0/8, country:US];
 MID_RHS_MATCH_FROM(0.00)[]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jul 2019 14:43:23 -0000

On 7/19/2019 5:02 AM, Henrik Gulbrandsen wrote:
> In the last few months, I have been extending the video support in bhyve
> to allow booting from live ISO images, which sometimes lack UEFI loaders.

Hi Henrick,

Wow. This looks impressive. Thanks for taking it on :)

> There was already a video BIOS with dormant support for VGA, but I could
> not use that, because the X11 int10 module runs a real-mode x86 emulator
> that aborts when it tries to enter the C code running in protected mode.

I wonder if this could be related to your CPU not supporting 
unrestricted guest mode? I know it's required for some bhyve functionality.

>
> Instead, I added support for PCI Expansion ROMs to bhyve and wrote a new
> SVGA video BIOS from scratch in 8086 assembly code. The current features
> include VGA modes 3 and 12h, 24-bit and 32-bit VESA modes from 640x480 to
> 1920x1200, and enough BIOS functions to boot a typical Linux desktop.
>
> At this point, I think it's good enough for a preliminary release, so if
> you are interested, you will find all patch files at the following URL:
>
>     https://www.gulbra.net/freebsd-bhyve/
>
> My apologies for the 15-year-old web layout, which will probably break
> horribly on modern smartphones. Also, I hope I have not duplicated the
> work of someone else. I didn't want to announce this before it worked.
>
Are you maintaining your changes in a public repo somewhere? If so, it 
would be great if you could share the location.

Thanks,

-Matthew


From owner-freebsd-virtualization@freebsd.org  Fri Jul 19 15:41:05 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0508FA5B95
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Fri, 19 Jul 2019 15:41:05 +0000 (UTC)
 (envelope-from henrik@gulbra.net)
Received: from srv.gulbra.net (ec2-174-129-193-206.compute-1.amazonaws.com
 [174.129.193.206])
 by mx1.freebsd.org (Postfix) with ESMTP id 7DCDA73278
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 15:41:04 +0000 (UTC)
 (envelope-from henrik@gulbra.net)
Received: from srv.gulbra.net (localhost [127.0.0.1])
 by srv.gulbra.net (Postfix) with ESMTP id 49203144
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 15:41:03 +0000 (UTC)
Received: by srv.gulbra.net (Postfix, from userid 33)
 id 1A07D149; Fri, 19 Jul 2019 15:41:03 +0000 (UTC)
To: FreeBSD Virtualization <freebsd-virtualization@freebsd.org>
Subject: Re: New video BIOS for bhyve
X-PHP-Originating-Script: 0:rcube.php
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Fri, 19 Jul 2019 17:41:03 +0200
From: Henrik Gulbrandsen <henrik@gulbra.net>
In-Reply-To: <d7dd8790-6e3b-467a-626b-031adc3ad435@shrew.net>
References: <ea5e9e82398c7cece09ebdd6f3551d31@www.gulbra.net>
 <d7dd8790-6e3b-467a-626b-031adc3ad435@shrew.net>
Message-ID: <0fdcfd552f08bb1b135a45a79a6e91b4@www.gulbra.net>
X-Sender: henrik@gulbra.net
User-Agent: Roundcube Webmail/1.2-beta
X-Rspamd-Queue-Id: 7DCDA73278
X-Spamd-Bar: /
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-0.56 / 15.00]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-0.94)[-0.935,0]; FROM_HAS_DN(0.00)[];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997,0];
 HAS_X_POS(0.00)[];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org];
 DMARC_NA(0.00)[gulbra.net]; MIME_GOOD(-0.10)[text/plain];
 RCPT_COUNT_ONE(0.00)[1]; AUTH_NA(1.00)[];
 RCVD_COUNT_THREE(0.00)[3]; PHP_SCRIPT_ROOT(1.00)[];
 TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: srv.gulbra.net];
 NEURAL_HAM_SHORT(-0.46)[-0.461,0]; R_SPF_NA(0.00)[];
 RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[];
 R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:14618, ipnet:174.129.0.0/16, country:US];
 IP_SCORE(-0.66)[asn: 14618(-3.25), country: US(-0.05)];
 MID_RHS_WWW(0.50)[]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jul 2019 15:41:05 -0000

On 2019-07-19 16:43, Matthew Grooms wrote:
>> There was already a video BIOS with dormant support for VGA, but I 
>> could
>> not use that, because the X11 int10 module runs a real-mode x86 
>> emulator
>> that aborts when it tries to enter the C code running in protected 
>> mode.
> 
> I wonder if this could be related to your CPU not supporting
> unrestricted guest mode? I know it's required for some bhyve
> functionality.

No, the int10 module runs the BIOS code on a software CPU.
Protected mode is simply not implemented.

> Are you maintaining your changes in a public repo somewhere?

Not at the moment. Without distributed version control, I figured the
version history would be lost anyway, so I simply took daily snapshots
of the main BIOS file. The remaining changes are mostly small things.

/Henrik


From owner-freebsd-virtualization@freebsd.org  Fri Jul 19 16:02:43 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E6FEA61C7
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Fri, 19 Jul 2019 16:02:43 +0000 (UTC)
 (envelope-from mgrooms@shrew.net)
Received: from mx1.shrew.net (mx1.shrew.net [38.97.5.131])
 (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 B944C73C54
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 16:02:42 +0000 (UTC)
 (envelope-from mgrooms@shrew.net)
Received: from mail.shrew.net (mail.shrew.prv [10.24.10.20])
 by mx1.shrew.net (8.15.2/8.15.2) with ESMTP id x6JFt4Gs015687
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 10:55:04 -0500 (CDT)
 (envelope-from mgrooms@shrew.net)
Received: from [10.16.32.30] (unknown [172.126.77.65])
 by mail.shrew.net (Postfix) with ESMTPSA id 901E6195E0A
 for <freebsd-virtualization@freebsd.org>; Fri, 19 Jul 2019 10:54:59 -0500 (CDT)
Subject: Re: New video BIOS for bhyve
To: freebsd-virtualization@freebsd.org
References: <ea5e9e82398c7cece09ebdd6f3551d31@www.gulbra.net>
 <d7dd8790-6e3b-467a-626b-031adc3ad435@shrew.net>
 <0fdcfd552f08bb1b135a45a79a6e91b4@www.gulbra.net>
From: Matthew Grooms <mgrooms@shrew.net>
Message-ID: <ec533375-cfd1-b15f-c9d2-06f83c04ea1c@shrew.net>
Date: Fri, 19 Jul 2019 10:54:58 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <0fdcfd552f08bb1b135a45a79a6e91b4@www.gulbra.net>
Content-Language: en-US
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2
 (mx1.shrew.net [10.24.10.10]); Fri, 19 Jul 2019 10:55:04 -0500 (CDT)
X-Rspamd-Queue-Id: B944C73C54
X-Spamd-Bar: ---
Authentication-Results: mx1.freebsd.org;
 spf=pass (mx1.freebsd.org: domain of mgrooms@shrew.net designates 38.97.5.131
 as permitted sender) smtp.mailfrom=mgrooms@shrew.net
X-Spamd-Result: default: False [-3.17 / 15.00]; ARC_NA(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0];
 FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx];
 TO_MATCH_ENVRCPT_ALL(0.00)[];
 MIME_GOOD(-0.10)[multipart/alternative,text/plain];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org];
 TO_DN_NONE(0.00)[]; URI_COUNT_ODD(1.00)[3];
 RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3];
 RCVD_TLS_LAST(0.00)[]; MX_GOOD(-0.01)[cached: mx1.shrew.net];
 NEURAL_HAM_SHORT(-0.90)[-0.901,0];
 RCVD_IN_DNSWL_NONE(0.00)[131.5.97.38.list.dnswl.org : 127.0.10.0];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 IP_SCORE(-0.96)[ip: (-9.32), ipnet: 38.0.0.0/8(2.81), asn: 174(1.77), country:
 US(-0.05)]; DMARC_NA(0.00)[shrew.net]; FROM_EQ_ENVFROM(0.00)[];
 R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+];
 ASN(0.00)[asn:174, ipnet:38.0.0.0/8, country:US];
 MID_RHS_MATCH_FROM(0.00)[]
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jul 2019 16:02:43 -0000

On 7/19/2019 10:41 AM, Henrik Gulbrandsen wrote:
> On 2019-07-19 16:43, Matthew Grooms wrote:
>>> There was already a video BIOS with dormant support for VGA, but I 
>>> could
>>> not use that, because the X11 int10 module runs a real-mode x86 
>>> emulator
>>> that aborts when it tries to enter the C code running in protected 
>>> mode.
>>
>> I wonder if this could be related to your CPU not supporting
>> unrestricted guest mode? I know it's required for some bhyve
>> functionality.
>
> No, the int10 module runs the BIOS code on a software CPU.
> Protected mode is simply not implemented.
>
I see. Well, I assume the code you reference worked without aborting at 
some point. There is a related SOC idea project mentioned here ...

https://wiki.freebsd.org/SummerOfCodeIdeas#VGA_emulation_improvements_for_bhyve 
<https://wiki.freebsd.org/SummerOfCodeIdeas>

-Matthew


From owner-freebsd-virtualization@freebsd.org  Sat Jul 20 13:14:14 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84C98BDDF7
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Sat, 20 Jul 2019 13:14:14 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:13])
 by mx1.freebsd.org (Postfix) with ESMTP id 67311818FA
 for <freebsd-virtualization@freebsd.org>; Sat, 20 Jul 2019 13:14:14 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: by mailman.nyi.freebsd.org (Postfix)
 id 64E1EBDDF6; Sat, 20 Jul 2019 13:14:14 +0000 (UTC)
Delivered-To: virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 638BBBDDF5
 for <virtualization@mailman.nyi.freebsd.org>;
 Sat, 20 Jul 2019 13:14:14 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 3CFB1818F9
 for <virtualization@FreeBSD.org>; Sat, 20 Jul 2019 13:14:14 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org (kenobi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:1d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FD9FAA8F
 for <virtualization@FreeBSD.org>; Sat, 20 Jul 2019 13:14:14 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
 by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x6KDED3C065802
 for <virtualization@FreeBSD.org>; Sat, 20 Jul 2019 13:14:13 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
 by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x6KDEDLP065801
 for virtualization@FreeBSD.org; Sat, 20 Jul 2019 13:14:13 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to
 bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: virtualization@FreeBSD.org
Subject: [Bug 239341] HDA support doesn't work for me
Date: Sat, 20 Jul 2019 13:14:13 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: bhyve
X-Bugzilla-Version: CURRENT
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Only Me
X-Bugzilla-Who: shamaz.mazum@gmail.com
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: virtualization@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
 op_sys bug_status bug_severity priority component assigned_to reporter
 attachments.created
Message-ID: <bug-239341-27103@https.bugs.freebsd.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-Rspamd-Queue-Id: 67311818FA
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[freebsd.org];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.98)[-0.983,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 20 Jul 2019 13:14:14 -0000

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239341

            Bug ID: 239341
           Summary: HDA support doesn't work for me
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bhyve
          Assignee: virtualization@FreeBSD.org
          Reporter: shamaz.mazum@gmail.com

Created attachment 205930
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D205930&action=
=3Dedit
Patch that fixes the problem for me

Hello. I am running FreeBSD 12.0-RELEASE and want to try hda (audio) suppor=
t,
which was added to CURRENT recently (base r349335). So I have cherry-picked
that commit (I use git mirror on github) and rebuilt bhyve.

When I add HDA device, bhyve aborts on assertion:

root@vonbraun:~ # bhyve -c 1 -m 2G -w -H -s 0,hostbridge -s
4,ahci-cd,/home/vasily/Fedora-Workstation-Live-x86_64-30-1.2.iso -s
6,hda,play=3D/dev/dsp -s 29,fbuf,tcp=3D127.0.0.1:5900,w=3D1920,h=3D1080 -s
30,xhci,tablet -s 31,lpc -l com1,stdio -l bootrom,BHYVE_UEFI.fd fedora
(Fedora is booting. Some messages skipped.)
Assertion failed: (!err), function hda_set_sdctl, file
/usr/src/usr.sbin/bhyve/pci_hda.c, line 1072.

Here are the last lines is bhyve_hda.log:

hda_set_sdctl-1063: stream_ind: 0x4 old: 0x50001c value: 0x50001e
hda_stream_start-677: stream: 0x4 bdl_cnt: 0x3 bdl_paddr: 0x773c5000
hda_stream_start-706: Fail to get the guest virtual address

So I have examined pci_hda.c and discovered that bdle pointer in
hda_stream_start function is shifted by 4 bytes from actual position of that
structure in memory. I cannot explain it, but the following patch fixes the
problem. Maybe it's because I did not rebuild the whole system, but maybe i=
t's
a bug in bhyve. Please tell me is HDA support work on your machine.

--=20
You are receiving this mail because:
You are the assignee for the bug.=

From owner-freebsd-virtualization@freebsd.org  Sat Jul 20 17:38:24 2019
Return-Path: <owner-freebsd-virtualization@freebsd.org>
Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C4C6C36DC
 for <freebsd-virtualization@mailman.nyi.freebsd.org>;
 Sat, 20 Jul 2019 17:38:24 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:13])
 by mx1.freebsd.org (Postfix) with ESMTP id F259689FA9
 for <freebsd-virtualization@freebsd.org>; Sat, 20 Jul 2019 17:38:23 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: by mailman.nyi.freebsd.org (Postfix)
 id F1E63C36DB; Sat, 20 Jul 2019 17:38:23 +0000 (UTC)
Delivered-To: virtualization@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1A4FC36DA
 for <virtualization@mailman.nyi.freebsd.org>;
 Sat, 20 Jul 2019 17:38:23 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id D2EB289FA8
 for <virtualization@FreeBSD.org>; Sat, 20 Jul 2019 17:38:23 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org (kenobi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:1d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC9F9DD66
 for <virtualization@FreeBSD.org>; Sat, 20 Jul 2019 17:38:23 +0000 (UTC)
 (envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
 by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x6KHcN1C005259
 for <virtualization@FreeBSD.org>; Sat, 20 Jul 2019 17:38:23 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
 by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x6KHcNsV005258
 for virtualization@FreeBSD.org; Sat, 20 Jul 2019 17:38:23 GMT
 (envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to
 bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: virtualization@FreeBSD.org
Subject: [Bug 239341] HDA support doesn't work for me
Date: Sat, 20 Jul 2019 17:38:23 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: bhyve
X-Bugzilla-Version: CURRENT
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Only Me
X-Bugzilla-Who: shamaz.mazum@gmail.com
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: virtualization@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: 
Message-ID: <bug-239341-27103-ye4Cbh5bvZ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-239341-27103@https.bugs.freebsd.org/bugzilla/>
References: <bug-239341-27103@https.bugs.freebsd.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-Rspamd-Queue-Id: F259689FA9
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[freebsd.org];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.98)[-0.985,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: freebsd-virtualization@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of various virtualization techniques FreeBSD supports."
 <freebsd-virtualization.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-virtualization/>
List-Post: <mailto:freebsd-virtualization@freebsd.org>
List-Help: <mailto:freebsd-virtualization-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization>, 
 <mailto:freebsd-virtualization-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 20 Jul 2019 17:38:24 -0000

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239341

--- Comment #1 from shamaz.mazum@gmail.com ---
Unfortunately, this quick&dirty fix works only for Fedora as a guest. And l=
et
me clarify myself a bit about that 4 byte shift.

I've added some additional debug code into hda_stream_start

diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c
index 99f8aec31c6..9d19e2ec504 100644
--- a/usr.sbin/bhyve/pci_hda.c
+++ b/usr.sbin/bhyve/pci_hda.c
@@ -678,6 +678,20 @@ hda_stream_start(struct hda_softc *sc, uint8_t stream_=
ind)

        st->bdl_cnt =3D bdl_cnt;

+       /* bdl_vaddr -=3D 4; */
+
+       bdle =3D (struct hda_bdle *)bdl_vaddr;
+       for (i =3D 0; i < bdl_cnt; i++, bdle++) {
+               bdle_sz =3D bdle->len;
+               assert(!(bdle_sz % HDA_DMA_ACCESS_LEN));
+
+               bdle_addrl =3D bdle->addrl;
+               bdle_addrh =3D bdle->addrh;
+
+               bdle_paddr =3D bdle_addrl | (bdle_addrh << 32);
+               DPRINTF("paddr: 0x%lx, len: 0x%x\n", bdle_paddr, bdle_sz);
+       }
+
        bdle =3D (struct hda_bdle *)bdl_vaddr;
        for (i =3D 0; i < bdl_cnt; i++, bdle++) {
                bdle_sz =3D bdle->len;


This is what I get in bhyve_hda.log when booting Fedora.

hda_stream_start-677: stream: 0x4 bdl_cnt: 0x2 bdl_paddr: 0x75a09000
hda_stream_start-692: paddr: 0x79f0000000000000, len: 0x0
hda_stream_start-692: paddr: 0x79f2b11000000000, len: 0x0
hda_stream_start-706: Fail to get the guest virtual address

I have gussed that bdl_vaddr is incorrect and bdle->addrh actualy contains
bdle->addrl, and bdle->ioc is actually bdle->len. So I subtracted 4 from
bdl_vaddr and got sound worked. But, unfortunatelly, it works only with Fed=
ora
guest. Other guests give no sound output or noise.

Waiting reply from users of CURRENT. Do you have the same trouble?

--=20
You are receiving this mail because:
You are the assignee for the bug.=