From nobody Tue Mar 21 17:04:43 2023
X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PgyfC6YVVz40Xky
	for <freebsd-virtualization@mlmmj.nyi.freebsd.org>; Tue, 21 Mar 2023 17:05:23 +0000 (UTC)
	(envelope-from marietto2008@gmail.com)
Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4PgyfC4dZsz3t44
	for <freebsd-virtualization@freebsd.org>; Tue, 21 Mar 2023 17:05:23 +0000 (UTC)
	(envelope-from marietto2008@gmail.com)
Authentication-Results: mx1.freebsd.org;
	none
Received: by mail-ed1-x52c.google.com with SMTP id o12so62411029edb.9
        for <freebsd-virtualization@freebsd.org>; Tue, 21 Mar 2023 10:05:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20210112; t=1679418322;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :from:to:cc:subject:date:message-id:reply-to;
        bh=2wf9yYWLvgCtnFesh+PpuiuZopeN2eLGl8UMewRZEDU=;
        b=C1XzVZlttWg0vfrO9kNBDOoQ7sFVP6ALQ63qsqZ7d7OmRRI8fx5n5dwrIcOuz+pKWc
         TaI3KvLKcKxxAW5RQdLw5i7JztL+F8KMH6Jfg6JB0vsBYb9H89NBTbUh6Z/JOsZai6s4
         yAfzjAwIR6Y/c25hAHmVJ5HirSI1d9iOVNEWcFk/HxH/zvAxfGo92YGOlZpFW+ixSU6G
         pJl+PEOv+mrlN51CfIslsvJagfEPmflxMfLZCsjhvQGHX/ggzCYkDUDum1ustFxaGl7p
         eTr8MSomuc6Ng+wx7id5XV8pbN74BHhizOCyaEnZ/wc0xJ7EV8GwUO+oRBWdaT6U3Plu
         syEQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112; t=1679418322;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
        bh=2wf9yYWLvgCtnFesh+PpuiuZopeN2eLGl8UMewRZEDU=;
        b=7pqPFB3JOBVUCxmWbbamQk2YB7Jrfb4JP4SvOMxVkzJLXt2mXdtTKTWjIOTz1ckRe3
         aS7g5bZeK851bczodjMDoFapD6Ib9+9FKO/R8iQaBFl54ReDzAXrczlNATf0No+tvKfp
         XzPVvG4yD8odoCSjYswv02ZXQwRGcpzHznTH8vjbJPSE+/l3NXydL7DwV3+Ox6xjvtzU
         UOVI33Uj4mjq3FLziYHkHKEAG1grEsGsChLBXOlLQI1wHum/m1vKhDuoeThrpAh12iJk
         4jahoZ3ji+4tp9SKHbNCbba4xfwxBP9eEyJH0KktCnp3T9K7sAOWmhYmibQYWKUUOcPc
         x2JA==
X-Gm-Message-State: AO0yUKW0oJdT1tm/UrIjZBfwOLZnvj9X5m3LaPt9Ful/7XUBF4c9GjUq
	d1lYi4ylclCC3rF+B/lOtpBStJbGwYdQayY7w6c=
X-Google-Smtp-Source: AK7set9gJR8Tari0Cu7Fl7dWqPpdgBAAWTgyn7J1JXdBxEd04rTBmheh6za6cDIOFWjT/tcc9reDTKrHhRqmv+PG3Ys=
X-Received: by 2002:a17:906:f1d9:b0:8b1:3c31:efe6 with SMTP id
 gx25-20020a170906f1d900b008b13c31efe6mr6572062ejb.3.1679418322192; Tue, 21
 Mar 2023 10:05:22 -0700 (PDT)
List-Id: Discussion <freebsd-virtualization.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization
List-Help: <mailto:virtualization+help@freebsd.org>
List-Post: <mailto:virtualization@freebsd.org>
List-Subscribe: <mailto:virtualization+subscribe@freebsd.org>
List-Unsubscribe: <mailto:virtualization+unsubscribe@freebsd.org>
Sender: owner-freebsd-virtualization@freebsd.org
X-BeenThere: freebsd-virtualization@freebsd.org
MIME-Version: 1.0
References: <CABQ-j0ZH-OrZSb866iVMba-ZfxOsovGoyLd=YZ=auOiNtm-TkA@mail.gmail.com>
 <CABQ-j0bbTQWhM1wgYvDvvwpxQexqgtYDgN4vj8pYp2Ttu_WHHg@mail.gmail.com>
 <343e827b-a1dc-b69b-9dcc-c6675deac070@quip.cz> <CA+1FSihrMf77N1Ec1wyndmvmJg5g6Ya9KJjKm9XcsM6o7R5V0g@mail.gmail.com>
 <CAJ5wse2Oyz+=P3ojNz8YqH79fKxJs7uOBzvMu7crkbxg_EykGQ@mail.gmail.com>
 <CA+1FSij5XiJ9o1Sgh8S2-y31XtUJ=GLMo6q6p-w49peApcDM5w@mail.gmail.com> <CAJ5wse0J+Jm3KGHMyNSQO+ApQCEva6o0meAW4xVf3rcKyT8ukA@mail.gmail.com>
In-Reply-To: <CAJ5wse0J+Jm3KGHMyNSQO+ApQCEva6o0meAW4xVf3rcKyT8ukA@mail.gmail.com>
From: Mario Marietto <marietto2008@gmail.com>
Date: Tue, 21 Mar 2023 18:04:43 +0100
Message-ID: <CA+1FSigdN1wpjgi4xJyspjBsJnmUxUzswtwr6Df=8JE9U4jiPw@mail.gmail.com>
Subject: Re: Bhyve process consumes way too much CPU
To: Nikita Olenets <zeon@zeon.kiev.ua>, =?UTF-8?Q?Julie_Koubov=C3=A1?= <julie@koubova.net>, 
	Miroslav Lachman <000.fbsd@quip.cz>, 
	FreeBSD virtualization <freebsd-virtualization@freebsd.org>
Content-Type: multipart/alternative; boundary="000000000000860cb005f76c0cec"
X-Rspamd-Queue-Id: 4PgyfC4dZsz3t44
X-Spamd-Bar: ----
X-Spamd-Result: default: False [-4.00 / 15.00];
	REPLY(-4.00)[];
	ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]
X-Rspamd-Pre-Result: action=no action;
	module=replies;
	Message is reply to one we originated
X-ThisMailContainsUnwantedMimeParts: N

--000000000000860cb005f76c0cec
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Yeah,that's another project that I will work on soon. So speak please. I
use bhyve every day.

On Tue, Mar 21, 2023 at 6:00=E2=80=AFPM Nikita Olenets <zeon@zeon.kiev.ua> =
wrote:

> Hey Mario,
>
> Yeah, sorry. I was thinking that you were the topic starter and you were
> trying to make things work under bhyve.
>
> Have a goo day.
>
> =E2=80=94 Nikita
>
> On Tue, Mar 21, 2023 at 12:54 Mario Marietto <marietto2008@gmail.com>
> wrote:
>
>> Are you talking with me ? I can install Home Assistant only on the
>> hardware that I already have. Actually the best piece of hardware that I
>> can use for my project (installing the chat gpt module on Home Assistant=
 +
>> a speech recognition software to give a voice to chat gpt) is the nvidia
>> jetson nano. And If I remember correctly,it supports only Ubuntu. I can =
do
>> the same on my Workstation,but I prefer to have the ability to move the
>> smaller nano within a plastic container. At the end of the day It will b=
e
>> almost the same as a vocal assistant,but uch more programmable.
>>
>> On Tue, Mar 21, 2023 at 5:41=E2=80=AFPM Nikita Olenets <zeon@zeon.kiev.u=
a> wrote:
>>
>>> Hi,
>>>
>>> Is there any specific reason you want it to be installed under Ubuntu?
>>> I=E2=80=99m asking this because I use HasOS(home assistant OS) which is=
 based on
>>> Linux (can=E2=80=99t recall the distribution) and I=E2=80=99m running t=
his for three years
>>> now. No issues at all. I do have even passed through ZigBee usb stick a=
nd
>>> it works just fine.
>>>
>>> On Mon, Mar 20, 2023 at 11:12 Mario Marietto <marietto2008@gmail.com>
>>> wrote:
>>>
>>>> Hello Julie.
>>>>
>>>> As I said some days ago,I'm trying to install homeassistant. For the
>>>> moment I'm using Ubuntu 20.04 that I have installed on the Jetson nano=
,but
>>>> later I will use Ubuntu within bhyve on FreeBSD. Unfortunately,a
>>>> developer,I suppose,told me that homeassistant is not supported on ubu=
ntu.
>>>> In Fact I tried to do that following this tutorial :
>>>>
>>>> https://vikoky.medium.com/jetson-nano-powered-house-29ce73f11de4
>>>>
>>>> but I've got a lot of errors. I've started a thread on reddit,asking
>>>> for help,here :
>>>>
>>>>
>>>> https://www.reddit.com/r/homeassistant/comments/11wglx7/homeassisant_c=
ant_be_installed_on_ubuntu_2004_the/
>>>>
>>>> and he/she told me that ubuntu is not supported. So,which linux
>>>> distribution have you used within bhyve ? thanks.
>>>>
>>>> On Sun, Mar 19, 2023 at 7:12=E2=80=AFPM Miroslav Lachman <000.fbsd@qui=
p.cz>
>>>> wrote:
>>>>
>>>>> On 18/03/2023 14:59, Julie Koubov=C3=A1 wrote:
>>>>> > Hey everyone,
>>>>> >
>>>>> > I'm running Linux (Home Assistant OS) in Bhyve on FreeBSD 13.1. I
>>>>> use
>>>>> > PCI passthrough to allow the VM to access a USB card with a couple
>>>>> of
>>>>> > radio dongles. The host machine is an Intel Core i3 13100 with 64 G=
B
>>>>> of
>>>>> > RAM. The CPU has 4 physical cores (8 hyper-threaded). The virtual
>>>>> > machine is assigned four cores.
>>>>> >
>>>>> > The host load averages are 0.39 0.39 0.40 right now, which seems wa=
y
>>>>> too
>>>>> > much. The same workload was previously handled by a Raspberry Pi 4,
>>>>> and
>>>>> > the CPU usage there was under 10% when not doing anything special.
>>>>> > Inside the guest OS, the CPU usage is reported around 5%, which
>>>>> seems
>>>>> > reasonable.
>>>>> >
>>>>> > What's wrong? How can I start debugging this issue? I use ZFS on th=
e
>>>>> > host, vm-bhyve to manage the virtual machines, and I don't have a
>>>>> swap
>>>>> > partition.
>>>>>
>>>>> I had similar problem few years ago. Never solved. Exhibited on bhyve
>>>>> and VirtualBox too. The problem was "the more vCPU for VM, the slower
>>>>> VM".
>>>>> Can you try to set just 1 vCPU to your VM? In my case, VM with 1 vCPU
>>>>> was fast, almost no overhead, 2 v CPUs slightly slower but 4 or more
>>>>> was
>>>>> slow as hell.
>>>>> I would also recommend not to overprovision real CPU core count to
>>>>> vCPU
>>>>> and not use multi/hyper threading cores as real cores. With your CPU,
>>>>> use only 4 cores to assign to all your VMs (4 VMs with 1 vCPU each, o=
r
>>>>> 2
>>>>> VMs with 2 vCPU each, 1 VM with 4 vCPU)
>>>>>
>>>>> Miroslav Lachman
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Mario.
>>>>
>>> --
>>> Nikita Olenets
>>>
>>>
>>
>> --
>> Mario.
>>
> --
> Nikita Olenets
>
>

--=20
Mario.

--000000000000860cb005f76c0cec
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Yeah,that&#39;s another project that I will work on soon. =
So speak please. I use bhyve every day. <br></div><br><div class=3D"gmail_q=
uote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Mar 21, 2023 at 6:00=E2=
=80=AFPM Nikita Olenets &lt;<a href=3D"mailto:zeon@zeon.kiev.ua" target=3D"=
_blank">zeon@zeon.kiev.ua</a>&gt; wrote:<br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,20=
4,204);padding-left:1ex"><div dir=3D"auto">Hey Mario,</div><div dir=3D"auto=
"><br></div><div dir=3D"auto">Yeah, sorry. I was thinking that you were the=
 topic starter and you were trying to make things work under bhyve.</div><d=
iv dir=3D"auto"><br></div><div dir=3D"auto">Have a goo day.</div><div dir=
=3D"auto"><br></div><div dir=3D"auto">=E2=80=94 Nikita</div><div><br><div c=
lass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Mar 21, =
2023 at 12:54 Mario Marietto &lt;<a href=3D"mailto:marietto2008@gmail.com" =
target=3D"_blank">marietto2008@gmail.com</a>&gt; wrote:<br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s=
olid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Are you talking wi=
th me ? I can install Home Assistant only on the hardware that I already ha=
ve. Actually the best piece of hardware that I can use for my project (inst=
alling the chat gpt module on Home Assistant + a speech recognition softwar=
e to give a voice to chat gpt) is the nvidia jetson nano. And If I remember=
 correctly,it supports only Ubuntu. I can do the same on my Workstation,but=
 I prefer to have the ability to move the smaller nano within a plastic con=
tainer. At the end of the day It will be almost the same as a vocal assista=
nt,but uch more programmable. <br></div><br><div class=3D"gmail_quote"><div=
 dir=3D"ltr" class=3D"gmail_attr">On Tue, Mar 21, 2023 at 5:41=E2=80=AFPM N=
ikita Olenets &lt;<a href=3D"mailto:zeon@zeon.kiev.ua" target=3D"_blank">ze=
on@zeon.kiev.ua</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pad=
ding-left:1ex"><div dir=3D"auto">Hi,</div><div dir=3D"auto"><br></div><div =
dir=3D"auto">Is there any specific reason you want it to be installed under=
 Ubuntu?</div><div dir=3D"auto">I=E2=80=99m asking this because I use HasOS=
(home assistant OS) which is based on Linux (can=E2=80=99t recall the distr=
ibution) and I=E2=80=99m running this for three=C2=A0years now. No issues a=
t all. I do have even passed through ZigBee usb stick and it works just fin=
e.</div><div dir=3D"auto"><br></div><div><div class=3D"gmail_quote"><div di=
r=3D"ltr" class=3D"gmail_attr">On Mon, Mar 20, 2023 at 11:12 Mario Marietto=
 &lt;<a href=3D"mailto:marietto2008@gmail.com" target=3D"_blank">marietto20=
08@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin=
g-left:1ex"><div dir=3D"ltr"><div>Hello Julie.</div><div><br></div><div>As =
I said some days ago,I&#39;m trying to install homeassistant. For the momen=
t I&#39;m using Ubuntu 20.04 that I have installed on the Jetson nano,but l=
ater I will use Ubuntu within bhyve on FreeBSD. Unfortunately,a developer,I=
 suppose,told me that homeassistant is not supported on ubuntu. In Fact I t=
ried to do that following this tutorial :</div><div><br></div><div><a href=
=3D"https://vikoky.medium.com/jetson-nano-powered-house-29ce73f11de4" targe=
t=3D"_blank">https://vikoky.medium.com/jetson-nano-powered-house-29ce73f11d=
e4</a></div><div><br></div><div>but I&#39;ve got a lot of errors. I&#39;ve =
started a thread on reddit,asking for help,here :</div><div><br></div><div>=
<a href=3D"https://www.reddit.com/r/homeassistant/comments/11wglx7/homeassi=
sant_cant_be_installed_on_ubuntu_2004_the/" target=3D"_blank">https://www.r=
eddit.com/r/homeassistant/comments/11wglx7/homeassisant_cant_be_installed_o=
n_ubuntu_2004_the/</a></div><div><br></div><div>and he/she told me that ubu=
ntu is not supported. So,which linux distribution have you used within bhyv=
e ? thanks.<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Sun, Mar 19, 2023 at 7:12=E2=80=AFPM Miroslav Lachm=
an &lt;<a href=3D"mailto:000.fbsd@quip.cz" target=3D"_blank">000.fbsd@quip.=
cz</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex=
">On 18/03/2023 14:59, Julie Koubov=C3=A1 wrote:<br>
&gt; Hey everyone,<br>
&gt; <br>
&gt; I&#39;m running Linux (Home Assistant OS) in Bhyve on FreeBSD 13.1. I =
use <br>
&gt; PCI passthrough to allow the VM to=C2=A0access a USB card with a coupl=
e of <br>
&gt; radio dongles. The host machine is an Intel Core i3 13100 with 64 GB o=
f <br>
&gt; RAM. The CPU has 4 physical cores (8 hyper-threaded). The virtual <br>
&gt; machine is assigned four cores.<br>
&gt; <br>
&gt; The host load averages are 0.39 0.39 0.40 right now, which seems way t=
oo <br>
&gt; much. The same workload was previously handled by a Raspberry Pi 4, an=
d <br>
&gt; the CPU usage there was under 10% when not doing anything special. <br=
>
&gt; Inside the guest OS, the CPU usage is reported around 5%, which seems =
<br>
&gt; reasonable.<br>
&gt; <br>
&gt; What&#39;s wrong? How can I start debugging this issue? I use ZFS on t=
he <br>
&gt; host, vm-bhyve to manage the virtual machines, and I don&#39;t have a =
swap <br>
&gt; partition.<br>
<br>
I had similar problem few years ago. Never solved. Exhibited on bhyve <br>
and VirtualBox too. The problem was &quot;the more vCPU for VM, the slower =
VM&quot;.<br>
Can you try to set just 1 vCPU to your VM? In my case, VM with 1 vCPU <br>
was fast, almost no overhead, 2 v CPUs slightly slower but 4 or more was <b=
r>
slow as hell.<br>
I would also recommend not to overprovision real CPU core count to vCPU <br=
>
and not use multi/hyper threading cores as real cores. With your CPU, <br>
use only 4 cores to assign to all your VMs (4 VMs with 1 vCPU each, or 2 <b=
r>
VMs with 2 vCPU each, 1 VM with 4 vCPU)<br>
<br>
Miroslav Lachman<br>
<br>
<br>
</blockquote></div><br clear=3D"all"><br><span>-- </span><br><div dir=3D"lt=
r">Mario.<br></div>
</blockquote></div></div>-- <br><div dir=3D"ltr"><div dir=3D"ltr"><div>Niki=
ta Olenets<br><br></div></div></div>
</blockquote></div><br clear=3D"all"><br><span>-- </span><br><div dir=3D"lt=
r">Mario.<br></div>
</blockquote></div></div>-- <br><div dir=3D"ltr"><div dir=3D"ltr"><div>Niki=
ta Olenets<br><br></div></div></div>
</blockquote></div><br clear=3D"all"><br><span>-- </span><br><div dir=3D"lt=
r">Mario.<br></div>

--000000000000860cb005f76c0cec--

From nobody Sun Mar 26 21:00:17 2023
X-Original-To: virtualization@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pl7cy1rpYz418Q0
	for <virtualization@mlmmj.nyi.freebsd.org>; Sun, 26 Mar 2023 21:00:18 +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)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4Pl7cx5Rydz47pk
	for <virtualization@FreeBSD.org>; Sun, 26 Mar 2023 21:00:17 +0000 (UTC)
	(envelope-from bugzilla-noreply@FreeBSD.org)
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1679864417;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=vWs1d6iHzcbccW7P6zi3pCqSRE8nHlOHG2dnKnB2UQo=;
	b=G+ZT4U0//IvkauBEdQMlX9zuHqkEjqiZXusppo09XZ+s2ex0KJw3eKv8c7ybRzL60JlX1i
	rgO7/0o2qSG0JASnHm5n21fAY31BGACISG9zA+sDfIPbIVOcgWXSb6k7XuVFa3yr8urP4u
	g9SYhbwPCGJkk3y/goaDm+Ed+u6o4c5EA1J4phT5M2mtbYDojCoABXh1CRXBBqinrTzoeZ
	ynWocYB8mgB5+7V02Y+i2uxoQwMN6295Al9xUguxDSkOLXt8fFIAVSippEJQO3GwbERVqm
	luUFk/sK1cvR6sKYMllCPILs29QGvzV/nfhFGhwwg0UhzdM11jAc6Jp3K2Wl+A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679864417; a=rsa-sha256; cv=none;
	b=N5wagIch2l0A2uXIeQlXz+IzBnpBvpwMMk5v0+zoqOG1mRzbNCZcwullOnyUNFkBgTzQyQ
	Gg9XVOMH+8MVeZ0wH9PuUa9tUb5Ga9le5Ro7zxkEONvQBwhWauw/FPLQwm/tOk/ik97/mH
	hJazYxhSON5n0J+hqqjHU/Pb+J7i9lMu2zv1S2MgZrfpxLyy+uWWCABMaICbdCavfSGwFp
	lwJ1E8cPPCg2MZpEyL7xO0UcAGQ6XCPD/ZhfNaZBGIYh8lJuRY3iEb8W/lTkzwCSgS5C+6
	65746u2EHIGzRP/wrx8lAYVhoWxTXJrGil0Aml3MAB4J9c6fySRdnX+dHv/5dQ==
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pl7cx4YQqzvXr
	for <virtualization@FreeBSD.org>; Sun, 26 Mar 2023 21:00:17 +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 32QL0HE0023908
	for <virtualization@FreeBSD.org>; Sun, 26 Mar 2023 21:00:17 GMT
	(envelope-from bugzilla-noreply@FreeBSD.org)
Received: (from bugzilla@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 32QL0HAx023907
	for virtualization@FreeBSD.org; Sun, 26 Mar 2023 21:00:17 GMT
	(envelope-from bugzilla-noreply@FreeBSD.org)
Message-Id: <202303262100.32QL0HAx023907@kenobi.freebsd.org>
X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@FreeBSD.org using -f
From: bugzilla-noreply@FreeBSD.org
To: virtualization@FreeBSD.org
Subject: Problem reports for virtualization@FreeBSD.org that need special
 attention
Date: Sun, 26 Mar 2023 21:00:17 +0000
List-Id: Discussion <freebsd-virtualization.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization
List-Help: <mailto:virtualization+help@freebsd.org>
List-Post: <mailto:virtualization@freebsd.org>
List-Subscribe: <mailto:virtualization+subscribe@freebsd.org>
List-Unsubscribe: <mailto:virtualization+unsubscribe@freebsd.org>
Sender: owner-freebsd-virtualization@freebsd.org
X-BeenThere: freebsd-virtualization@freebsd.org
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="16798644175.30AC.22095"
Content-Transfer-Encoding: 7bit
X-ThisMailContainsUnwantedMimeParts: N


--16798644175.30AC.22095
Date: Sun, 26 Mar 2023 21:00:17 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"

To view an individual PR, use:
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id).

The following is a listing of current problems submitted by FreeBSD users,
which need special attention. These represent problem reports covering
all versions including experimental development code and obsolete releases.

Status      |    Bug Id | Description
------------+-----------+---------------------------------------------------
In Progress |    247208 | mpt(4): VMWare virtualized LSI controller panics  
New         |    240945 | [hyper-v] [netvsc] hn network driver incorrectly  
Open        |    244838 | "bectl activate -t" does not honor the -t flag in 

3 problems total for which you should take action.

--16798644175.30AC.22095
Date: Sun, 26 Mar 2023 21:00:17 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"

<pre style="font-family: monospace;">
The following is a listing of current problems submitted by FreeBSD users,
which need special attention. These represent problem reports covering
all versions including experimental development code and obsolete releases.

Status      |    Bug Id | Description
------------+-----------+---------------------------------------------------
In Progress |    <a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247208">247208</a> | <a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247208">mpt(4): VMWare virtualized LSI controller panics </a>
New         |    <a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240945">240945</a> | <a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240945">[hyper-v] [netvsc] hn network driver incorrectly </a>
Open        |    <a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244838">244838</a> | <a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244838">&quot;bectl activate -t&quot; does not honor the -t flag in</a>

3 problems total for which you should take action.
</pre>
--16798644175.30AC.22095--

From nobody Wed Mar 29 10:44:01 2023
X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pmjpb6j75z42Ng6
	for <freebsd-virtualization@mlmmj.nyi.freebsd.org>; Wed, 29 Mar 2023 10:44:07 +0000 (UTC)
	(envelope-from contact@evilham.com)
Received: from yggdrasil.evilham.com (yggdrasil.evilham.com [46.19.33.155])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4Pmjpb02Kcz40JB
	for <freebsd-virtualization@FreeBSD.org>; Wed, 29 Mar 2023 10:44:06 +0000 (UTC)
	(envelope-from contact@evilham.com)
Authentication-Results: mx1.freebsd.org;
	dkim=pass header.d=evilham.com header.s=mail header.b=suuSKY6w;
	spf=pass (mx1.freebsd.org: domain of contact@evilham.com designates 46.19.33.155 as permitted sender) smtp.mailfrom=contact@evilham.com;
	dmarc=pass (policy=quarantine) header.from=evilham.com
From: Evilham <contact@evilham.com>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=evilham.com; s=mail;
	t=1680086644; bh=DjdmyyGs+knLHQPTIjDY4m3mBxs38jrHbsQut20UO0U=;
	h=From:To:Subject:Date;
	b=suuSKY6wzeGNVtIsruo9QvyuYl2lVRVQ9r87YHxM7VyxJcxdCN6z8pse2irUZkpxm
	 8s59ZOC307twsjAvi8bxAz3fvMrxe+bHN3K17yxayjVeSWmEW94SZGVa999QTNOLCB
	 FO3z+JJOpWfn0k4AUyhepSmS8YrBjBLorEK/vv4U=
To: freebsd-virtualization@FreeBSD.org
Subject: CURRENT: Operation not supported by device
Date: Wed, 29 Mar 2023 12:44:01 +0200
Message-ID: <b9c2691be6de74bcd2eb6306ab397f341fba@yggdrasil.evilham.com>
List-Id: Discussion <freebsd-virtualization.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization
List-Help: <mailto:virtualization+help@freebsd.org>
List-Post: <mailto:virtualization@freebsd.org>
List-Subscribe: <mailto:virtualization+subscribe@freebsd.org>
List-Unsubscribe: <mailto:virtualization+unsubscribe@freebsd.org>
Sender: owner-freebsd-virtualization@freebsd.org
X-BeenThere: freebsd-virtualization@freebsd.org
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
X-Spamd-Result: default: False [-3.86 / 15.00];
	NEURAL_HAM_LONG(-1.00)[-1.000];
	NEURAL_HAM_MEDIUM(-1.00)[-0.999];
	NEURAL_HAM_SHORT(-0.86)[-0.859];
	DMARC_POLICY_ALLOW(-0.50)[evilham.com,quarantine];
	R_SPF_ALLOW(-0.20)[+mx];
	R_DKIM_ALLOW(-0.20)[evilham.com:s=mail];
	MIME_GOOD(-0.10)[text/plain];
	MLMMJ_DEST(0.00)[freebsd-virtualization@FreeBSD.org];
	ARC_NA(0.00)[];
	FROM_EQ_ENVFROM(0.00)[];
	RCVD_COUNT_ZERO(0.00)[0];
	DKIM_TRACE(0.00)[evilham.com:+];
	RCPT_COUNT_ONE(0.00)[1];
	MIME_TRACE(0.00)[0:+];
	FROM_HAS_DN(0.00)[];
	MID_RHS_MATCH_FROMTLD(0.00)[];
	TO_MATCH_ENVRCPT_ALL(0.00)[];
	TO_DN_NONE(0.00)[];
	ASN(0.00)[asn:196752, ipnet:46.19.32.0/21, country:NL]
X-Rspamd-Queue-Id: 4Pmjpb02Kcz40JB
X-Spamd-Bar: ---
X-ThisMailContainsUnwantedMimeParts: N

Hello,

I've been using bhyve for a while now and in the past couple days 
(though I'm not sure when it started, certainly less than two 
weeks ago), I've been getting this message when trying to start a 
VM on CURRENT:

# # This is after unloading vmm
# sh /usr/share/examples/bhyve/vmrun.sh -E -I null.iso -d 
  disk0.img test
*** vmm.ko is not loaded
# kldload vmm
# sh /usr/share/examples/bhyve/vmrun.sh -E -I null.iso -d 
  disk0.img test
Launching virtual machine "test" ...
device emulation initialization error: Operation not supported by 
device
# bhyvectl --vm=test --destroy
# kldunload vmm


FWIW, there have been no changes on the BIOS, as can be seen vmm 
loads without issues or warnings.
I usually use vm-bhyve, but was trying to discard that by going 
back to the basics.

Would greatly appreciate pointers as to where to look in order to 
be able to use bhyve again :-).

This is the CPU as reported on dmesg:

CPU: AMD Ryzen 7 PRO 2700U w/ Radeon Vega Mobile Gfx (2196.04-MHz 
K8-class CPU)
  Origin="AuthenticAMD"  Id=0x810f10  Family=0x17  Model=0x11 
  Stepping=0
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x7ed8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD 
  Features2=0x35c233ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,SKINIT,WDT,TCE,Topology,PCXC,PNXC,DBE,PL2I,MWAITX>
  Structured Extended 
  Features=0x209c01a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  AMD Extended Feature Extensions ID 
  EBX=0x1007<CLZERO,IRPerf,XSaveErPtr,IBPB>
  SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=32768
  TSC: P-state invariant, performance statistics

And on with sysctl dev.cpu.0 (there are 0-7 of these)
dev.cpu.0.cx_method: C1/hlt C2/io
dev.cpu.0.cx_usage_counters: 415801 517428
dev.cpu.0.cx_usage: 44.55% 55.44% last 2765us
dev.cpu.0.cx_lowest: C8
dev.cpu.0.cx_supported: C1/1/1 C2/2/400
dev.cpu.0.freq_levels: 2200/2681 1700/1615 1600/1460
dev.cpu.0.freq: 2200
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none _UID=0 _CID=none
dev.cpu.0.%location: handle=\_PR_.C000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU

Thanks in advance for any pointers!
--
Evilham

From nobody Wed Mar 29 11:08:28 2023
X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PmkLm4Gtwz42Q1y
	for <freebsd-virtualization@mlmmj.nyi.freebsd.org>; Wed, 29 Mar 2023 11:08:32 +0000 (UTC)
	(envelope-from corvink@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "smtp.freebsd.org", Issuer "R3" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4PmkLm3pb6z42b5;
	Wed, 29 Mar 2023 11:08:32 +0000 (UTC)
	(envelope-from corvink@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1680088112;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=mF7q2T9/cIjthGud3R0aLgAkNjsglWAr+gNkOs3n/uY=;
	b=WSK1FBcwcOJ0hc1yBu34pfJ4cRp5eh/ZSEvkmQhoWWjVaUkA+w1TrW5jm0tgYxIO4HVzeq
	NiYe1rtjONZBT4YtwyJ49N2de5n2LOCtM4Yi/Ba5W7Ft4vXB/Mv4E1Udld6CEUAbFCpr2t
	p5liqd29E/6Q5gGRBKT9fJ35hkLsJbHU14XSMapTU07MTzMt1mAdCrJnsjwa4Vo58RcuMo
	93Cs49fDkXVINmxd+6vB+LIIjHu27RTeE+hr+y58nT8pFLCrZwf3TqWPerVQ026jZIhdbc
	mpdzsClPkNvgQGgy3KzxF4d0acEM97rmBpGVG74DNysqPHJudaVY02yesjUDsQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1680088112;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=mF7q2T9/cIjthGud3R0aLgAkNjsglWAr+gNkOs3n/uY=;
	b=bhzlzWKeENXiUn2jZiWpcjbAZFzvMHJSRsghvEwtSM5Mm6fkC7e5PxVfr5Vrd0QNsDD0bM
	RRLZ+DQ7kBgaMMM0n5HSe/vw+SK5GgTt6PG6PPFsdsfeA2yvWNisWvXeM1CKSg+wl9p218
	0uCjvnBeAut7oADVYE5okZt5JD3ht6UFD81SoPFLvJVGapZWZt7OOla45yV55t/jH6FtQi
	isjXpzkmIeBH4ab6W2wQbrr1e/EY+kxPi2oDGJswEPc4FH7uSBbhHk+3B8RR/XsGaBNNjp
	4nv3w/oB11r+KpBf2GM+3ybXsMiJu+ViQU7hbQA9zbMkQ6bR49ZUK2QxiryDMQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680088112; a=rsa-sha256; cv=none;
	b=x1OWDY7W7d4YyXAKjc0UH/bUyWnAWyMv/MNIwNRTf9gAlCSe/ZGHrsXZ+5y9GYK/XXxF50
	gxDZhNQHrRb3tudQqEPIHKfkEIExPOWMGcJAjtlnxkGFPRVboh6UC2C1NPvDSZ4W2QJc7j
	TbcxjXbGU6zqFLcalJLCAsbbcyDiQJvdhDgyUx54aH1nHRZrOeOrOiVmxF04ZxovSz88ln
	qkv3pYKx3YqWGZEFToMXN+BHybK2Fk32vzNY7NiiSoVyK/dBawVCG8qQF19YpfG/2IRwmT
	v83J4Wwi2p0IiTaXlOEYh+wnYgNNAhy0v1GyW/iYcHL9aTVD0udWgQFgGw5u6w==
Received: from [IPv6:2001:9e8:da6e:3a00:eeb6:2c69:e8e0:7741] (unknown [IPv6:2001:9e8:da6e:3a00:eeb6:2c69:e8e0:7741])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	(Authenticated sender: corvink)
	by smtp.freebsd.org (Postfix) with ESMTPSA id 4PmkLm0469z13qy;
	Wed, 29 Mar 2023 11:08:31 +0000 (UTC)
	(envelope-from corvink@FreeBSD.org)
Message-ID: <4118bddf3c1ff0724f9e83934c534bb38baa48a9.camel@FreeBSD.org>
Subject: Re: CURRENT: Operation not supported by device
From: Corvin =?ISO-8859-1?Q?K=F6hne?= <corvink@FreeBSD.org>
To: Evilham <contact@evilham.com>, freebsd-virtualization@FreeBSD.org
Date: Wed, 29 Mar 2023 13:08:28 +0200
In-Reply-To: <b9c2691be6de74bcd2eb6306ab397f341fba@yggdrasil.evilham.com>
References: <b9c2691be6de74bcd2eb6306ab397f341fba@yggdrasil.evilham.com>
Content-Type: multipart/signed; micalg="pgp-sha256";
	protocol="application/pgp-signature"; boundary="=-JQoWqU9vB1fw3zMGApwN"
User-Agent: Evolution 3.46.4 
List-Id: Discussion <freebsd-virtualization.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization
List-Help: <mailto:virtualization+help@freebsd.org>
List-Post: <mailto:virtualization@freebsd.org>
List-Subscribe: <mailto:virtualization+subscribe@freebsd.org>
List-Unsubscribe: <mailto:virtualization+unsubscribe@freebsd.org>
Sender: owner-freebsd-virtualization@freebsd.org
X-BeenThere: freebsd-virtualization@freebsd.org
MIME-Version: 1.0
X-ThisMailContainsUnwantedMimeParts: N


--=-JQoWqU9vB1fw3zMGApwN
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Wed, 2023-03-29 at 12:44 +0200, Evilham wrote:
> Hello,
>=20
> I've been using bhyve for a while now and in the past couple days=20
> (though I'm not sure when it started, certainly less than two=20
> weeks ago), I've been getting this message when trying to start a=20
> VM on CURRENT:
>=20
> # # This is after unloading vmm
> # sh /usr/share/examples/bhyve/vmrun.sh -E -I null.iso -d=20
> =C2=A0 disk0.img test
> *** vmm.ko is not loaded
> # kldload vmm
> # sh /usr/share/examples/bhyve/vmrun.sh -E -I null.iso -d=20
> =C2=A0 disk0.img test
> Launching virtual machine "test" ...
> device emulation initialization error: Operation not supported by=20
> device
> # bhyvectl --vm=3Dtest --destroy
> # kldunload vmm
>=20
>=20
> FWIW, there have been no changes on the BIOS, as can be seen vmm=20
> loads without issues or warnings.
> I usually use vm-bhyve, but was trying to discard that by going=20
> back to the basics.
>=20
> Would greatly appreciate pointers as to where to look in order to=20
> be able to use bhyve again :-).
>=20
> This is the CPU as reported on dmesg:
>=20
> CPU: AMD Ryzen 7 PRO 2700U w/ Radeon Vega Mobile Gfx (2196.04-MHz=20
> K8-class CPU)
> =C2=A0 Origin=3D"AuthenticAMD"=C2=A0 Id=3D0x810f10=C2=A0 Family=3D0x17=C2=
=A0 Model=3D0x11=20
> =C2=A0 Stepping=3D0
> =C2=A0
> Features=3D0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,
> PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
> =C2=A0
> Features2=3D0x7ed8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,
> MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
> =C2=A0 AMD Features=3D0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
> =C2=A0 AMD=20
> =C2=A0
> Features2=3D0x35c233ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,
> OSVW,SKINIT,WDT,TCE,Topology,PCXC,PNXC,DBE,PL2I,MWAITX>
> =C2=A0 Structured Extended=20
> =C2=A0
> Features=3D0x209c01a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFL
> USHOPT,SHA>
> =C2=A0 XSAVE Features=3D0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
> =C2=A0 AMD Extended Feature Extensions ID=20
> =C2=A0 EBX=3D0x1007<CLZERO,IRPerf,XSaveErPtr,IBPB>
> =C2=A0 SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=3D32768
> =C2=A0 TSC: P-state invariant, performance statistics
>=20
> And on with sysctl dev.cpu.0 (there are 0-7 of these)
> dev.cpu.0.cx_method: C1/hlt C2/io
> dev.cpu.0.cx_usage_counters: 415801 517428
> dev.cpu.0.cx_usage: 44.55% 55.44% last 2765us
> dev.cpu.0.cx_lowest: C8
> dev.cpu.0.cx_supported: C1/1/1 C2/2/400
> dev.cpu.0.freq_levels: 2200/2681 1700/1615 1600/1460
> dev.cpu.0.freq: 2200
> dev.cpu.0.%parent: acpi0
> dev.cpu.0.%pnpinfo: _HID=3Dnone _UID=3D0 _CID=3Dnone
> dev.cpu.0.%location: handle=3D\_PR_.C000
> dev.cpu.0.%driver: cpu
> dev.cpu.0.%desc: ACPI CPU
>=20
> Thanks in advance for any pointers!
> --
> Evilham
>=20

Hi Evilham,

I've already seen this issue on one of my AMD devices too. Could you
please test the following patch:
https://reviews.freebsd.org/D39310


--=20
Kind regards,
Corvin

--=-JQoWqU9vB1fw3zMGApwN
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEgvRSla3m2t/H2U9G2FTaVjFeAmoFAmQkHCwACgkQ2FTaVjFe
Amp54xAAkeeRAmxXv8OTSilZ7Li8cNY/nfCuE8W5WmOexPQswQcCikNopmVO17r9
20h+254cq+/eFKhAdv8wm9H9wdMOMCtWyBlL1w02mWAh2IejeRF1nPGbtqCwksF/
rCwmbTsh9o86xThswNP2nv9xmHGxcNb8T7Wu5paLNsnduJKYgJuAOIKQJqMuNYlB
lwp2IVxRPFQBouStOwiykeAB6GDrU40Z8KEv4MImQiw0GTTkhRZokMqAsXxC5H1D
4YpaL7+qPNAGqE4Hxc5Z3178THJS3dYFdPoVqvpLr3pBW2HEB1GWDlAK+gWJhpjy
yt1beDnAS8KdpjkV8xKeQfKRDZqKRmfN+gb8kDUx+dhPA+u9fg7JH/X741p9OS9L
c4HPsrlGKaxBXiSzvSm95mUjapprd5Ks/3gsVgAHgjcCL/QbjXMzbg4RV39HWiZx
qy/zQ4uO8OAzrrzyXPiumN4iqf54HTBSmEkad2GGA/5An+/aQCmMuBDuC/94vuO0
wUD/cBMGNdOfQilmIxiyx97iCtr48RvhUSjK1TRXbZWv+/ssKjlbMPj0g3KeES8W
62lWgpjainNqAI07l5GJkNHfDjS0vlbthZ0uXEG7NbqscTkRTstDC2Llcczq1xOy
siAjRwyc5bSNjpQ3NeR8X4Ag0rKd/ERVBQq3w9AXHn4TqAwuC1A=
=G+Ol
-----END PGP SIGNATURE-----

--=-JQoWqU9vB1fw3zMGApwN--

From nobody Fri Mar 31 12:39:36 2023
X-Original-To: virtualization@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pp0HJ0TKDz42Rck
	for <virtualization@mlmmj.nyi.freebsd.org>; Fri, 31 Mar 2023 12:39:56 +0000 (UTC)
	(envelope-from corvink@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "smtp.freebsd.org", Issuer "R3" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4Pp0HH6nnRz3rQD;
	Fri, 31 Mar 2023 12:39:55 +0000 (UTC)
	(envelope-from corvink@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1680266396;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:
	 content-transfer-encoding:content-transfer-encoding;
	bh=oW+u3ZaA4hAXvsT0cz+xJenwrQKzKQdffQyv0zMGjgw=;
	b=m35WiPbF4WyPB6tQaf11nxotTHkqiwRYwAlmDY+4K7BIpkiZBfLQ5A7E7nSBY+ZamgdkfA
	4UMpMMHzKAs/ocml5db5XAquRNHU+m6b6DRBZyuhlCN6Z2jOtcUpe2wsU1kgYWrDovNMXv
	CN8EbnDhMneZD3Qyfxzg4ja3iounuHSSwfLA4r1xqR7eIVQ//x4WoltOQ67NgE/fqcG4Ie
	5y5A84MC/1sUPRhDccXmMdBYETMqEaEj4hJ/UIc2ycAWPreHrpu3NY6wuHrURNIrRnI0ug
	gbZqxmxWvjoS0RpoC78/vQBzT6v0vT8ousacMBB/i2SbGWlgNPBNbYEbDILZbQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1680266395;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:
	 content-transfer-encoding:content-transfer-encoding;
	bh=oW+u3ZaA4hAXvsT0cz+xJenwrQKzKQdffQyv0zMGjgw=;
	b=yplPFYC0Py0IextvEZudfUirzkeJBl4RPcxtpUVIs/PMZFpYdoNjzvrrFKKoImWPLXPDzZ
	9KCn/6U5yIPks/ybqFqjkgZIIpCprVvMCQglm+Nj8ety8VXzcjoJoK9Nl5owvi06aWHQ6s
	QCTytcNiM8ZeontbKEV8iz8Z3NQ7pXUHVbn+vL5vRnS2GD4bxJb6c8xoliNK6fH4kmyrV8
	pvWVJT1d4C2VI1mcA1tSQYmlB9T8FMZyF2aZh2rdtvsVOzPF3F+McYqmpC+IxD7Zb/amjL
	CdIXeu9KltbALTQ18jDrV0EKcn47doLKKvuSG2s45iZ50Jr6SPpAiH3AZfw5rg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680266396; a=rsa-sha256; cv=none;
	b=H2T7PSoUDKwV61jHScHh9p5++q1B+Chypz4WotN1NySya1ulpBvaAISnVvzx44xXh7Gwya
	Y1thy23T6DFt6L2LYIygv1ExBcleeWsX76eqHkFPfhn6G6IGgllpZ5xA4XBGfLaqKjpq1W
	mWYCyQkMLdCYsotxX4kHjdkNtjLBO+ogPt2o+jpuIWpzE1hZRq2xyJqFwOwcg7i68AU7Yj
	B6YwoLq1STJt0VjcX/9iAJlAz6pB2mRO8RgMWsd1fEwhDYy5ECIjRqfLR5H6jKmFkN9kdP
	phOqstV06/n2In6pjo0p8yfDWHei6F/bA2TKDQbi52m7LJR1iwZayEMkRAWtSg==
Received: from corvink-nb.beckhoff.com (unknown [IPv6:2001:9e8:da7c:e100:6c2:e97e:dcc:5135])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	(Authenticated sender: corvink)
	by smtp.freebsd.org (Postfix) with ESMTPSA id 4Pp0HH30V0z12Y5;
	Fri, 31 Mar 2023 12:39:55 +0000 (UTC)
	(envelope-from corvink@FreeBSD.org)
From: =?UTF-8?q?Corvin=20K=C3=B6hne?= <corvink@FreeBSD.org>
To: virtualization@FreeBSD.org
Cc: =?UTF-8?q?Corvin=20K=C3=B6hne?= <corvink@FreeBSD.org>
Subject: [PATCH] OvmfPkg/BhyveBhf: install bhyve's ACPI tables
Date: Fri, 31 Mar 2023 14:39:36 +0200
Message-Id: <20230331123936.540020-1-corvink@FreeBSD.org>
X-Mailer: git-send-email 2.40.0
List-Id: Discussion <freebsd-virtualization.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization
List-Help: <mailto:virtualization+help@freebsd.org>
List-Post: <mailto:virtualization@freebsd.org>
List-Subscribe: <mailto:virtualization+subscribe@freebsd.org>
List-Unsubscribe: <mailto:virtualization+unsubscribe@freebsd.org>
Sender: owner-freebsd-virtualization@freebsd.org
X-BeenThere: freebsd-virtualization@freebsd.org
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-ThisMailContainsUnwantedMimeParts: N

Hi,

I would like to send the following patch to the EDKII project.
Therefore, I'd like to get some feedback from the bhyve community before
sending them to EDKII.

At the moment, UEFI guests are using static ACPI tables. Modifying them
is not easy because we need to patch them in the EDKII repo.
Additionally, ACPI tables should be configuration dependent. If one
assigns a TPM device to one guest, this guest requires different ACPI
tables than other guests.

Bhyve already builds it own set of ACPI tables. This patch picks them up
an installs them in the UEFI guest. This will overcome the mentioned
limitations.

Note that this patch is required to easily implement features like
qemu's fwcfg or a tpm device emulation.

Here's the patch:

It's much easier to create configuration dependend ACPI tables for bhyve
than for OVMF. For this reason, don't use the statically created ACPI
tables provided by OVMF. Instead prefer the dynamically created ACPI
tables of bhyve. If bhyve provides no ACPI tables or we are unable to
detect those, fall back to OVMF tables.

Implementation is similar to OvmfPkg/XenAcpiPlatformDxe/Xen.c.
---
 MdePkg/Include/Uefi/UefiBaseType.h           |   2 +
 OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c |  15 ++
 OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h |   6 +
 OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c        | 266 +++++++++++++++++++
 4 files changed, 289 insertions(+)

diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiB=
aseType.h
index 83975a08eb..b18a0760ee 100644
--- a/MdePkg/Include/Uefi/UefiBaseType.h
+++ b/MdePkg/Include/Uefi/UefiBaseType.h
@@ -54,6 +54,8 @@ typedef UINT64 EFI_PHYSICAL_ADDRESS;
 ///=0D
 typedef UINT64 EFI_VIRTUAL_ADDRESS;=0D
 =0D
+#define NUMERIC_VALUE_AS_POINTER(Type, Value)  ((Type *) ((UINTN)(Value)))=
=0D
+=0D
 ///=0D
 /// EFI Time Abstraction:=0D
 ///  Year:       1900 - 9999=0D
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/Bhyve/A=
cpiPlatformDxe/AcpiPlatform.c
index 999e9f151e..34d9fc80d0 100644
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
@@ -243,6 +243,21 @@ InstallAcpiTables (
 {=0D
   EFI_STATUS  Status;=0D
 =0D
+  Status =3D InstallBhyveTables (AcpiTable);=0D
+  if (!EFI_ERROR (Status)) {=0D
+    return EFI_SUCCESS;=0D
+  }=0D
+=0D
+  if (Status !=3D EFI_NOT_FOUND) {=0D
+    DEBUG ((=0D
+      DEBUG_INFO,=0D
+      "%a: unable to install bhyve's ACPI tables (%r)\n",=0D
+      __FUNCTION__,=0D
+      Status=0D
+      ));=0D
+    return Status;=0D
+  }=0D
+=0D
   Status =3D InstallOvmfFvTables (AcpiTable);=0D
 =0D
   return Status;=0D
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/Bhyve/A=
cpiPlatformDxe/AcpiPlatform.h
index 54d1af073e..b2724135d0 100644
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h
@@ -46,6 +46,12 @@ BhyveInstallAcpiTable (
   OUT  UINTN                    *TableKey=0D
   );=0D
 =0D
+EFI_STATUS=0D
+EFIAPI=0D
+InstallBhyveTables (=0D
+  IN   EFI_ACPI_TABLE_PROTOCOL  *AcpiProtocol=0D
+  );=0D
+=0D
 EFI_STATUS=0D
 EFIAPI=0D
 InstallXenTables (=0D
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c b/OvmfPkg/Bhyve/AcpiPlat=
formDxe/Bhyve.c
index e216a21bfa..5e1b759c01 100644
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c
@@ -13,6 +13,18 @@
 #include <Library/MemoryAllocationLib.h>=0D
 #include <Library/QemuFwCfgLib.h>             // QemuFwCfgFindFile()=0D
 =0D
+#define BHYVE_ACPI_PHYSICAL_ADDRESS  ((UINTN)0x000F2400)=0D
+#define BHYVE_BIOS_PHYSICAL_END      ((UINTN)0x00100000)=0D
+=0D
+#pragma pack (1)=0D
+=0D
+typedef struct {=0D
+  EFI_ACPI_DESCRIPTION_HEADER    Header;=0D
+  UINT64                         Tables[0];=0D
+} EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE;=0D
+=0D
+#pragma pack ()=0D
+=0D
 STATIC=0D
 EFI_STATUS=0D
 EFIAPI=0D
@@ -164,3 +176,257 @@ BhyveInstallAcpiTable (
            TableKey=0D
            );=0D
 }=0D
+=0D
+/**=0D
+  Get the address of bhyve's ACPI Root System Description Pointer (RSDP).=
=0D
+=0D
+  @param  RsdpPtr             Return pointer to RSDP.=0D
+=0D
+  @return EFI_SUCCESS         Bhyve's RSDP successfully found.=0D
+  @return EFI_NOT_FOUND       Couldn't find bhyve's RSDP.=0D
+  @return EFI_UNSUPPORTED     Revision is lower than 2.=0D
+  @return EFI_PROTOCOL_ERROR  Invalid RSDP found.=0D
+=0D
+**/=0D
+EFI_STATUS=0D
+EFIAPI=0D
+BhyveGetAcpiRsdp (=0D
+  OUT   EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  **RsdpPtr=0D
+  )=0D
+{=0D
+  UINTN                                         RsdpAddress;=0D
+  EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  *Rsdp;=0D
+=0D
+  if (RsdpPtr =3D=3D NULL) {=0D
+    return EFI_INVALID_PARAMETER;=0D
+  }=0D
+=0D
+  //=0D
+  // Detect the RSDP=0D
+  //=0D
+  for (RsdpAddress =3D BHYVE_ACPI_PHYSICAL_ADDRESS;=0D
+       RsdpAddress < BHYVE_BIOS_PHYSICAL_END;=0D
+       RsdpAddress +=3D 0x10)=0D
+  {=0D
+    Rsdp =3D NUMERIC_VALUE_AS_POINTER (=0D
+             EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER,=0D
+             RsdpAddress=0D
+             );=0D
+    if (Rsdp->Signature !=3D EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_=
SIGNATURE) {=0D
+      continue;=0D
+    }=0D
+=0D
+    if (Rsdp->Revision < 2) {=0D
+      DEBUG ((DEBUG_INFO, "%a: unsupported RSDP found\n", __FUNCTION__));=
=0D
+      return EFI_UNSUPPORTED;=0D
+    }=0D
+=0D
+    //=0D
+    // For ACPI 1.0/2.0/3.0 the checksum of first 20 bytes should be 0.=0D
+    // For ACPI 2.0/3.0 the checksum of the entire table should be 0.=0D
+    //=0D
+    UINT8  Sum =3D CalculateCheckSum8 (=0D
+                   (CONST UINT8 *)Rsdp,=0D
+                   sizeof (EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER)=0D
+                   );=0D
+    if (Sum !=3D 0) {=0D
+      DEBUG ((=0D
+        DEBUG_INFO,=0D
+        "%a: RSDP header checksum not valid: 0x%02x\n",=0D
+        __FUNCTION__,=0D
+        Sum=0D
+        ));=0D
+      return EFI_PROTOCOL_ERROR;=0D
+    }=0D
+=0D
+    Sum =3D CalculateCheckSum8 (=0D
+            (CONST UINT8 *)Rsdp,=0D
+            sizeof (EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER)=0D
+            );=0D
+    if (Sum !=3D 0) {=0D
+      DEBUG ((=0D
+        DEBUG_INFO,=0D
+        "%a: RSDP table checksum not valid: 0x%02x\n",=0D
+        __FUNCTION__,=0D
+        Sum=0D
+        ));=0D
+      return EFI_PROTOCOL_ERROR;=0D
+    }=0D
+=0D
+    //=0D
+    // RSDP was found and is valid=0D
+    //=0D
+    *RsdpPtr =3D Rsdp;=0D
+=0D
+    return EFI_SUCCESS;=0D
+  }=0D
+=0D
+  DEBUG ((DEBUG_INFO, "%a: RSDP not found\n", __FUNCTION__));=0D
+  return EFI_NOT_FOUND;=0D
+}=0D
+=0D
+/**=0D
+  Get bhyve's ACPI tables from the RSDP. And install bhyve's ACPI tables=0D
+  into the RSDT/XSDT using InstallAcpiTable.=0D
+=0D
+  @param  AcpiProtocol        Protocol instance pointer.=0D
+=0D
+  @return EFI_SUCCESS         All tables were successfully inserted.=0D
+  @return EFI_UNSUPPORTED     Bhyve's ACPI tables doesn't include a XSDT.=
=0D
+  @return EFI_PROTOCOL_ERROR  Invalid XSDT found.=0D
+=0D
+  @return                     Error codes propagated from underlying funct=
ions.=0D
+**/=0D
+EFI_STATUS=0D
+EFIAPI=0D
+InstallBhyveTables (=0D
+  IN   EFI_ACPI_TABLE_PROTOCOL  *AcpiProtocol=0D
+  )=0D
+{=0D
+  EFI_STATUS                                    Status;=0D
+  UINTN                                         TableHandle;=0D
+  EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  *Rsdp;=0D
+  EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE  *Facs;=0D
+  EFI_ACPI_DESCRIPTION_HEADER                   *Dsdt;=0D
+=0D
+  Rsdp =3D NULL;=0D
+  Facs =3D NULL;=0D
+  Dsdt =3D NULL;=0D
+=0D
+  //=0D
+  // Try to find bhyve ACPI tables=0D
+  //=0D
+  Status =3D BhyveGetAcpiRsdp (&Rsdp);=0D
+  if (EFI_ERROR (Status)) {=0D
+    DEBUG ((DEBUG_INFO, "%a: can't get RSDP (%r)\n", __FUNCTION__, Status)=
);=0D
+    return Status;=0D
+  }=0D
+=0D
+  //=0D
+  // Bhyve should always provide a XSDT=0D
+  //=0D
+  EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE *CONST  Xsdt =3D=0D
+    NUMERIC_VALUE_AS_POINTER (=0D
+      EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE,=0D
+      Rsdp->XsdtAddress=0D
+      );=0D
+=0D
+  if (Xsdt =3D=3D NULL) {=0D
+    DEBUG ((DEBUG_INFO, "%a: XSDT not found\n", __FUNCTION__));=0D
+    return EFI_UNSUPPORTED;=0D
+  }=0D
+=0D
+  if (Xsdt->Header.Length < sizeof (EFI_ACPI_DESCRIPTION_HEADER)) {=0D
+    DEBUG ((DEBUG_INFO, "%a: invalid XSDT length\n", __FUNCTION__));=0D
+    return EFI_PROTOCOL_ERROR;=0D
+  }=0D
+=0D
+  //=0D
+  // Install ACPI tables=0D
+  //=0D
+  CONST UINTN  NumberOfTableEntries =3D=0D
+    (Xsdt->Header.Length - sizeof (Xsdt->Header)) / sizeof (UINT64);=0D
+=0D
+  for (UINTN Index =3D 0; Index < NumberOfTableEntries; Index++) {=0D
+    EFI_ACPI_DESCRIPTION_HEADER *CONST  CurrentTable =3D=0D
+      NUMERIC_VALUE_AS_POINTER (=0D
+        EFI_ACPI_DESCRIPTION_HEADER,=0D
+        Xsdt->Tables[Index]=0D
+        );=0D
+    Status =3D AcpiProtocol->InstallAcpiTable (=0D
+                             AcpiProtocol,=0D
+                             CurrentTable,=0D
+                             CurrentTable->Length,=0D
+                             &TableHandle=0D
+                             );=0D
+    if (EFI_ERROR (Status)) {=0D
+      DEBUG ((=0D
+        DEBUG_INFO,=0D
+        "%a: failed to install ACPI table %c%c%c%c (%r)\n",=0D
+        __FUNCTION__,=0D
+        NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable->Signature)[0],=0D
+        NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable->Signature)[1],=0D
+        NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable->Signature)[2],=0D
+        NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable->Signature)[3],=0D
+        Status=0D
+        ));=0D
+      return Status;=0D
+    }=0D
+=0D
+    if (CurrentTable->Signature =3D=3D EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION=
_TABLE_SIGNATURE) {=0D
+      EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *CONST  Fadt =3D=0D
+        (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *CONST)CurrentTable;=0D
+      if (Fadt->XFirmwareCtrl) {=0D
+        Facs =3D NUMERIC_VALUE_AS_POINTER (=0D
+                 EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE,=0D
+                 Fadt->XFirmwareCtrl=0D
+                 );=0D
+      } else {=0D
+        Facs =3D NUMERIC_VALUE_AS_POINTER (=0D
+                 EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE,=0D
+                 Fadt->FirmwareCtrl=0D
+                 );=0D
+      }=0D
+=0D
+      if (Fadt->XDsdt) {=0D
+        Dsdt =3D NUMERIC_VALUE_AS_POINTER (=0D
+                 EFI_ACPI_DESCRIPTION_HEADER,=0D
+                 Fadt->XDsdt=0D
+                 );=0D
+      } else {=0D
+        Dsdt =3D NUMERIC_VALUE_AS_POINTER (=0D
+                 EFI_ACPI_DESCRIPTION_HEADER,=0D
+                 Fadt->Dsdt=0D
+                 );=0D
+      }=0D
+    }=0D
+  }=0D
+=0D
+  //=0D
+  // Install FACS=0D
+  //=0D
+  if (Facs !=3D NULL) {=0D
+    Status =3D AcpiProtocol->InstallAcpiTable (=0D
+                             AcpiProtocol,=0D
+                             Facs,=0D
+                             Facs->Length,=0D
+                             &TableHandle=0D
+                             );=0D
+    if (EFI_ERROR (Status)) {=0D
+      DEBUG ((=0D
+        DEBUG_INFO,=0D
+        "%a: failed to install FACS (%r)\n",=0D
+        __FUNCTION__,=0D
+        Status=0D
+        ));=0D
+      return Status;=0D
+    }=0D
+  }=0D
+=0D
+  //=0D
+  // Install DSDT=0D
+  // If it's not found, something bad happened. Don't continue execution.=
=0D
+  //=0D
+  if (Dsdt =3D=3D NULL) {=0D
+    DEBUG ((DEBUG_ERROR, "%a: failed to find DSDT\n", __FUNCTION__));=0D
+    CpuDeadLoop ();=0D
+  }=0D
+=0D
+  Status =3D AcpiProtocol->InstallAcpiTable (=0D
+                           AcpiProtocol,=0D
+                           Dsdt,=0D
+                           Dsdt->Length,=0D
+                           &TableHandle=0D
+                           );=0D
+  if (EFI_ERROR (Status)) {=0D
+    DEBUG ((=0D
+      DEBUG_INFO,=0D
+      "%a: failed to install DSDT (%r)\n",=0D
+      __FUNCTION__,=0D
+      Status=0D
+      ));=0D
+    return Status;=0D
+  }=0D
+=0D
+  return EFI_SUCCESS;=0D
+}=0D
--=20
2.40.0


From nobody Fri Mar 31 12:59:33 2023
X-Original-To: virtualization@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pp0kg20q8z42T2V
	for <virtualization@mlmmj.nyi.freebsd.org>; Fri, 31 Mar 2023 13:00:11 +0000 (UTC)
	(envelope-from marietto2008@gmail.com)
Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4Pp0kg060zz3vZq;
	Fri, 31 Mar 2023 13:00:11 +0000 (UTC)
	(envelope-from marietto2008@gmail.com)
Authentication-Results: mx1.freebsd.org;
	none
Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-53d277c1834so413076067b3.10;
        Fri, 31 Mar 2023 06:00:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20210112; t=1680267610; x=1682859610;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:from:to:cc:subject:date:message-id:reply-to;
        bh=tPrw9n8qgh7rJuURM0S1iopAJZvqRhM5JnBLiPszCN0=;
        b=dPHW5eri5DIf4vCZpApHgLVhTOaJ5sOxIfDdFDSXqmQ1pHMJqv+Ge6WBp5Dkte6z4r
         J9pqsxzIsxzRE5FB4zJ47W2qukQX2faqwBSO/5b+QbD3zkLoBzcY1BaOkuU/Gx0emsMe
         YUX12q7io6v6M9mYC+3VyO3r9g7r3OzHnkRkSR8tl2oCzdj3zE9KUZZfRGqDPjk67GxJ
         JvsYTWGdKCF9U0lm+KyWk3qI90Faydx0EhMu/MsOKb6kNer3/UUTTD6GhvygISJW6q3y
         PCv6DmUnWLBO11x88cp3nfJHX8F5GUm9VB9A38xeot+JZXyu7Z3y1qWpPF4aUuKg6Ngt
         sDYA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112; t=1680267610; x=1682859610;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=tPrw9n8qgh7rJuURM0S1iopAJZvqRhM5JnBLiPszCN0=;
        b=Vqq03A3vn9GShlWHVl0zD28rBjtd5hFo+Nrxk2TUqGMf0kztoMAEfR5sUcRbg1OelL
         HdWnCH5JJSWcauWNiaOqupUm04hAyrvtGjrm31+TtTCFHwbrqJk1enmY8nkA38w4FaxN
         m0lyKZUa2ciyd3sJQwQrDXbcbdpoSDDSkgjoSY8o+SE2XrS26a0Qx1dagzs4r//J2mZv
         KKNrBoCyaFUWtgrA1SPMc2HVEldQBjySJKYDKOZ+WEVADpMRbgRmgByc2MrE6NNM2pI0
         +H/T35yGZHrJy2wYnGcDaYg/1bASTjfuYZ74uATJ+2W2somId3X43MxRCgkuIcoDcNzr
         Sa7g==
X-Gm-Message-State: AAQBX9fEC0reRBkyGv1M5zdmAtCrUTiLl+iREsemVz9JXdZQ5qJ9ejtC
	nXkK8QcLp9fGB5kLwJWkF88XRAsGSN1qqG3lnIuMhWxO4UU=
X-Google-Smtp-Source: AKy350bk8jNCQxThQsthBVegbZ3KgqKlMCwZY5E7QG22Tumcwv6V+DKzqJyKcNvl9bbrZrpYETBsfePKWUtceweDxK8=
X-Received: by 2002:a81:b721:0:b0:545:3f42:2d97 with SMTP id
 v33-20020a81b721000000b005453f422d97mr12594095ywh.3.1680267609695; Fri, 31
 Mar 2023 06:00:09 -0700 (PDT)
List-Id: Discussion <freebsd-virtualization.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization
List-Help: <mailto:virtualization+help@freebsd.org>
List-Post: <mailto:virtualization@freebsd.org>
List-Subscribe: <mailto:virtualization+subscribe@freebsd.org>
List-Unsubscribe: <mailto:virtualization+unsubscribe@freebsd.org>
Sender: owner-freebsd-virtualization@freebsd.org
X-BeenThere: freebsd-virtualization@freebsd.org
MIME-Version: 1.0
References: <20230331123936.540020-1-corvink@FreeBSD.org>
In-Reply-To: <20230331123936.540020-1-corvink@FreeBSD.org>
From: Mario Marietto <marietto2008@gmail.com>
Date: Fri, 31 Mar 2023 14:59:33 +0200
Message-ID: <CA+1FSiggd8Z8VEC=KGhV7wkBiWH1rtJdNTAm8nq71Q-3HgOHsQ@mail.gmail.com>
Subject: Re: [PATCH] OvmfPkg/BhyveBhf: install bhyve's ACPI tables
To: =?UTF-8?Q?Corvin_K=C3=B6hne?= <corvink@freebsd.org>
Cc: virtualization@freebsd.org
Content-Type: multipart/alternative; boundary="00000000000000eace05f831cab3"
X-Rspamd-Queue-Id: 4Pp0kg060zz3vZq
X-Spamd-Bar: ----
X-Spamd-Result: default: False [-4.00 / 15.00];
	REPLY(-4.00)[];
	ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]
X-Rspamd-Pre-Result: action=no action;
	module=replies;
	Message is reply to one we originated
X-ThisMailContainsUnwantedMimeParts: N

--00000000000000eace05f831cab3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello Corvin.

I will try your patch very soon if you  want to write carefully all the
commands that I should issue. Thanks.

On Fri, Mar 31, 2023 at 2:40=E2=80=AFPM Corvin K=C3=B6hne <corvink@freebsd.=
org> wrote:

> Hi,
>
> I would like to send the following patch to the EDKII project.
> Therefore, I'd like to get some feedback from the bhyve community before
> sending them to EDKII.
>
> At the moment, UEFI guests are using static ACPI tables. Modifying them
> is not easy because we need to patch them in the EDKII repo.
> Additionally, ACPI tables should be configuration dependent. If one
> assigns a TPM device to one guest, this guest requires different ACPI
> tables than other guests.
>
> Bhyve already builds it own set of ACPI tables. This patch picks them up
> an installs them in the UEFI guest. This will overcome the mentioned
> limitations.
>
> Note that this patch is required to easily implement features like
> qemu's fwcfg or a tpm device emulation.
>
> Here's the patch:
>
> It's much easier to create configuration dependend ACPI tables for bhyve
> than for OVMF. For this reason, don't use the statically created ACPI
> tables provided by OVMF. Instead prefer the dynamically created ACPI
> tables of bhyve. If bhyve provides no ACPI tables or we are unable to
> detect those, fall back to OVMF tables.
>
> Implementation is similar to OvmfPkg/XenAcpiPlatformDxe/Xen.c.
> ---
>  MdePkg/Include/Uefi/UefiBaseType.h           |   2 +
>  OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c |  15 ++
>  OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h |   6 +
>  OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c        | 266 +++++++++++++++++++
>  4 files changed, 289 insertions(+)
>
> diff --git a/MdePkg/Include/Uefi/UefiBaseType.h
> b/MdePkg/Include/Uefi/UefiBaseType.h
> index 83975a08eb..b18a0760ee 100644
> --- a/MdePkg/Include/Uefi/UefiBaseType.h
> +++ b/MdePkg/Include/Uefi/UefiBaseType.h
> @@ -54,6 +54,8 @@ typedef UINT64 EFI_PHYSICAL_ADDRESS;
>  ///
>  typedef UINT64 EFI_VIRTUAL_ADDRESS;
>
> +#define NUMERIC_VALUE_AS_POINTER(Type, Value)  ((Type *) ((UINTN)(Value)=
))
> +
>  ///
>  /// EFI Time Abstraction:
>  ///  Year:       1900 - 9999
> diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
> b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
> index 999e9f151e..34d9fc80d0 100644
> --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
> +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
> @@ -243,6 +243,21 @@ InstallAcpiTables (
>  {
>    EFI_STATUS  Status;
>
> +  Status =3D InstallBhyveTables (AcpiTable);
> +  if (!EFI_ERROR (Status)) {
> +    return EFI_SUCCESS;
> +  }
> +
> +  if (Status !=3D EFI_NOT_FOUND) {
> +    DEBUG ((
> +      DEBUG_INFO,
> +      "%a: unable to install bhyve's ACPI tables (%r)\n",
> +      __FUNCTION__,
> +      Status
> +      ));
> +    return Status;
> +  }
> +
>    Status =3D InstallOvmfFvTables (AcpiTable);
>
>    return Status;
> diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h
> b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h
> index 54d1af073e..b2724135d0 100644
> --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h
> +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h
> @@ -46,6 +46,12 @@ BhyveInstallAcpiTable (
>    OUT  UINTN                    *TableKey
>    );
>
> +EFI_STATUS
> +EFIAPI
> +InstallBhyveTables (
> +  IN   EFI_ACPI_TABLE_PROTOCOL  *AcpiProtocol
> +  );
> +
>  EFI_STATUS
>  EFIAPI
>  InstallXenTables (
> diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c
> b/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c
> index e216a21bfa..5e1b759c01 100644
> --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c
> +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c
> @@ -13,6 +13,18 @@
>  #include <Library/MemoryAllocationLib.h>
>  #include <Library/QemuFwCfgLib.h>             // QemuFwCfgFindFile()
>
> +#define BHYVE_ACPI_PHYSICAL_ADDRESS  ((UINTN)0x000F2400)
> +#define BHYVE_BIOS_PHYSICAL_END      ((UINTN)0x00100000)
> +
> +#pragma pack (1)
> +
> +typedef struct {
> +  EFI_ACPI_DESCRIPTION_HEADER    Header;
> +  UINT64                         Tables[0];
> +} EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE;
> +
> +#pragma pack ()
> +
>  STATIC
>  EFI_STATUS
>  EFIAPI
> @@ -164,3 +176,257 @@ BhyveInstallAcpiTable (
>             TableKey
>             );
>  }
> +
> +/**
> +  Get the address of bhyve's ACPI Root System Description Pointer (RSDP)=
.
> +
> +  @param  RsdpPtr             Return pointer to RSDP.
> +
> +  @return EFI_SUCCESS         Bhyve's RSDP successfully found.
> +  @return EFI_NOT_FOUND       Couldn't find bhyve's RSDP.
> +  @return EFI_UNSUPPORTED     Revision is lower than 2.
> +  @return EFI_PROTOCOL_ERROR  Invalid RSDP found.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +BhyveGetAcpiRsdp (
> +  OUT   EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  **RsdpPtr
> +  )
> +{
> +  UINTN                                         RsdpAddress;
> +  EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  *Rsdp;
> +
> +  if (RsdpPtr =3D=3D NULL) {
> +    return EFI_INVALID_PARAMETER;
> +  }
> +
> +  //
> +  // Detect the RSDP
> +  //
> +  for (RsdpAddress =3D BHYVE_ACPI_PHYSICAL_ADDRESS;
> +       RsdpAddress < BHYVE_BIOS_PHYSICAL_END;
> +       RsdpAddress +=3D 0x10)
> +  {
> +    Rsdp =3D NUMERIC_VALUE_AS_POINTER (
> +             EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER,
> +             RsdpAddress
> +             );
> +    if (Rsdp->Signature !=3D
> EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE) {
> +      continue;
> +    }
> +
> +    if (Rsdp->Revision < 2) {
> +      DEBUG ((DEBUG_INFO, "%a: unsupported RSDP found\n", __FUNCTION__))=
;
> +      return EFI_UNSUPPORTED;
> +    }
> +
> +    //
> +    // For ACPI 1.0/2.0/3.0 the checksum of first 20 bytes should be 0.
> +    // For ACPI 2.0/3.0 the checksum of the entire table should be 0.
> +    //
> +    UINT8  Sum =3D CalculateCheckSum8 (
> +                   (CONST UINT8 *)Rsdp,
> +                   sizeof (EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER)
> +                   );
> +    if (Sum !=3D 0) {
> +      DEBUG ((
> +        DEBUG_INFO,
> +        "%a: RSDP header checksum not valid: 0x%02x\n",
> +        __FUNCTION__,
> +        Sum
> +        ));
> +      return EFI_PROTOCOL_ERROR;
> +    }
> +
> +    Sum =3D CalculateCheckSum8 (
> +            (CONST UINT8 *)Rsdp,
> +            sizeof (EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER)
> +            );
> +    if (Sum !=3D 0) {
> +      DEBUG ((
> +        DEBUG_INFO,
> +        "%a: RSDP table checksum not valid: 0x%02x\n",
> +        __FUNCTION__,
> +        Sum
> +        ));
> +      return EFI_PROTOCOL_ERROR;
> +    }
> +
> +    //
> +    // RSDP was found and is valid
> +    //
> +    *RsdpPtr =3D Rsdp;
> +
> +    return EFI_SUCCESS;
> +  }
> +
> +  DEBUG ((DEBUG_INFO, "%a: RSDP not found\n", __FUNCTION__));
> +  return EFI_NOT_FOUND;
> +}
> +
> +/**
> +  Get bhyve's ACPI tables from the RSDP. And install bhyve's ACPI tables
> +  into the RSDT/XSDT using InstallAcpiTable.
> +
> +  @param  AcpiProtocol        Protocol instance pointer.
> +
> +  @return EFI_SUCCESS         All tables were successfully inserted.
> +  @return EFI_UNSUPPORTED     Bhyve's ACPI tables doesn't include a XSDT=
.
> +  @return EFI_PROTOCOL_ERROR  Invalid XSDT found.
> +
> +  @return                     Error codes propagated from underlying
> functions.
> +**/
> +EFI_STATUS
> +EFIAPI
> +InstallBhyveTables (
> +  IN   EFI_ACPI_TABLE_PROTOCOL  *AcpiProtocol
> +  )
> +{
> +  EFI_STATUS                                    Status;
> +  UINTN                                         TableHandle;
> +  EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  *Rsdp;
> +  EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE  *Facs;
> +  EFI_ACPI_DESCRIPTION_HEADER                   *Dsdt;
> +
> +  Rsdp =3D NULL;
> +  Facs =3D NULL;
> +  Dsdt =3D NULL;
> +
> +  //
> +  // Try to find bhyve ACPI tables
> +  //
> +  Status =3D BhyveGetAcpiRsdp (&Rsdp);
> +  if (EFI_ERROR (Status)) {
> +    DEBUG ((DEBUG_INFO, "%a: can't get RSDP (%r)\n", __FUNCTION__,
> Status));
> +    return Status;
> +  }
> +
> +  //
> +  // Bhyve should always provide a XSDT
> +  //
> +  EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE *CONST  Xsdt =3D
> +    NUMERIC_VALUE_AS_POINTER (
> +      EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE,
> +      Rsdp->XsdtAddress
> +      );
> +
> +  if (Xsdt =3D=3D NULL) {
> +    DEBUG ((DEBUG_INFO, "%a: XSDT not found\n", __FUNCTION__));
> +    return EFI_UNSUPPORTED;
> +  }
> +
> +  if (Xsdt->Header.Length < sizeof (EFI_ACPI_DESCRIPTION_HEADER)) {
> +    DEBUG ((DEBUG_INFO, "%a: invalid XSDT length\n", __FUNCTION__));
> +    return EFI_PROTOCOL_ERROR;
> +  }
> +
> +  //
> +  // Install ACPI tables
> +  //
> +  CONST UINTN  NumberOfTableEntries =3D
> +    (Xsdt->Header.Length - sizeof (Xsdt->Header)) / sizeof (UINT64);
> +
> +  for (UINTN Index =3D 0; Index < NumberOfTableEntries; Index++) {
> +    EFI_ACPI_DESCRIPTION_HEADER *CONST  CurrentTable =3D
> +      NUMERIC_VALUE_AS_POINTER (
> +        EFI_ACPI_DESCRIPTION_HEADER,
> +        Xsdt->Tables[Index]
> +        );
> +    Status =3D AcpiProtocol->InstallAcpiTable (
> +                             AcpiProtocol,
> +                             CurrentTable,
> +                             CurrentTable->Length,
> +                             &TableHandle
> +                             );
> +    if (EFI_ERROR (Status)) {
> +      DEBUG ((
> +        DEBUG_INFO,
> +        "%a: failed to install ACPI table %c%c%c%c (%r)\n",
> +        __FUNCTION__,
> +        NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable->Signature)[0],
> +        NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable->Signature)[1],
> +        NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable->Signature)[2],
> +        NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable->Signature)[3],
> +        Status
> +        ));
> +      return Status;
> +    }
> +
> +    if (CurrentTable->Signature =3D=3D
> EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE) {
> +      EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *CONST  Fadt =3D
> +        (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *CONST)CurrentTable;
> +      if (Fadt->XFirmwareCtrl) {
> +        Facs =3D NUMERIC_VALUE_AS_POINTER (
> +                 EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE,
> +                 Fadt->XFirmwareCtrl
> +                 );
> +      } else {
> +        Facs =3D NUMERIC_VALUE_AS_POINTER (
> +                 EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE,
> +                 Fadt->FirmwareCtrl
> +                 );
> +      }
> +
> +      if (Fadt->XDsdt) {
> +        Dsdt =3D NUMERIC_VALUE_AS_POINTER (
> +                 EFI_ACPI_DESCRIPTION_HEADER,
> +                 Fadt->XDsdt
> +                 );
> +      } else {
> +        Dsdt =3D NUMERIC_VALUE_AS_POINTER (
> +                 EFI_ACPI_DESCRIPTION_HEADER,
> +                 Fadt->Dsdt
> +                 );
> +      }
> +    }
> +  }
> +
> +  //
> +  // Install FACS
> +  //
> +  if (Facs !=3D NULL) {
> +    Status =3D AcpiProtocol->InstallAcpiTable (
> +                             AcpiProtocol,
> +                             Facs,
> +                             Facs->Length,
> +                             &TableHandle
> +                             );
> +    if (EFI_ERROR (Status)) {
> +      DEBUG ((
> +        DEBUG_INFO,
> +        "%a: failed to install FACS (%r)\n",
> +        __FUNCTION__,
> +        Status
> +        ));
> +      return Status;
> +    }
> +  }
> +
> +  //
> +  // Install DSDT
> +  // If it's not found, something bad happened. Don't continue execution=
.
> +  //
> +  if (Dsdt =3D=3D NULL) {
> +    DEBUG ((DEBUG_ERROR, "%a: failed to find DSDT\n", __FUNCTION__));
> +    CpuDeadLoop ();
> +  }
> +
> +  Status =3D AcpiProtocol->InstallAcpiTable (
> +                           AcpiProtocol,
> +                           Dsdt,
> +                           Dsdt->Length,
> +                           &TableHandle
> +                           );
> +  if (EFI_ERROR (Status)) {
> +    DEBUG ((
> +      DEBUG_INFO,
> +      "%a: failed to install DSDT (%r)\n",
> +      __FUNCTION__,
> +      Status
> +      ));
> +    return Status;
> +  }
> +
> +  return EFI_SUCCESS;
> +}
> --
> 2.40.0
>
>
>

--=20
Mario.

--00000000000000eace05f831cab3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hello Corvin.</div><div><br></div><div>I will try you=
r patch very soon if you=C2=A0 want to write carefully all the commands tha=
t I should issue. Thanks.</div></div><br><div class=3D"gmail_quote"><div di=
r=3D"ltr" class=3D"gmail_attr">On Fri, Mar 31, 2023 at 2:40=E2=80=AFPM Corv=
in K=C3=B6hne &lt;<a href=3D"mailto:corvink@freebsd.org">corvink@freebsd.or=
g</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin=
:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"=
>Hi,<br>
<br>
I would like to send the following patch to the EDKII project.<br>
Therefore, I&#39;d like to get some feedback from the bhyve community befor=
e<br>
sending them to EDKII.<br>
<br>
At the moment, UEFI guests are using static ACPI tables. Modifying them<br>
is not easy because we need to patch them in the EDKII repo.<br>
Additionally, ACPI tables should be configuration dependent. If one<br>
assigns a TPM device to one guest, this guest requires different ACPI<br>
tables than other guests.<br>
<br>
Bhyve already builds it own set of ACPI tables. This patch picks them up<br=
>
an installs them in the UEFI guest. This will overcome the mentioned<br>
limitations.<br>
<br>
Note that this patch is required to easily implement features like<br>
qemu&#39;s fwcfg or a tpm device emulation.<br>
<br>
Here&#39;s the patch:<br>
<br>
It&#39;s much easier to create configuration dependend ACPI tables for bhyv=
e<br>
than for OVMF. For this reason, don&#39;t use the statically created ACPI<b=
r>
tables provided by OVMF. Instead prefer the dynamically created ACPI<br>
tables of bhyve. If bhyve provides no ACPI tables or we are unable to<br>
detect those, fall back to OVMF tables.<br>
<br>
Implementation is similar to OvmfPkg/XenAcpiPlatformDxe/Xen.c.<br>
---<br>
=C2=A0MdePkg/Include/Uefi/UefiBaseType.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0|=C2=A0 =C2=A02 +<br>
=C2=A0OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c |=C2=A0 15 ++<br>
=C2=A0OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h |=C2=A0 =C2=A06 +<br>
=C2=A0OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 | 26=
6 +++++++++++++++++++<br>
=C2=A04 files changed, 289 insertions(+)<br>
<br>
diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiB=
aseType.h<br>
index 83975a08eb..b18a0760ee 100644<br>
--- a/MdePkg/Include/Uefi/UefiBaseType.h<br>
+++ b/MdePkg/Include/Uefi/UefiBaseType.h<br>
@@ -54,6 +54,8 @@ typedef UINT64 EFI_PHYSICAL_ADDRESS;<br>
=C2=A0///<br>
=C2=A0typedef UINT64 EFI_VIRTUAL_ADDRESS;<br>
<br>
+#define NUMERIC_VALUE_AS_POINTER(Type, Value)=C2=A0 ((Type *) ((UINTN)(Val=
ue)))<br>
+<br>
=C2=A0///<br>
=C2=A0/// EFI Time Abstraction:<br>
=C2=A0///=C2=A0 Year:=C2=A0 =C2=A0 =C2=A0 =C2=A01900 - 9999<br>
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/Bhyve/A=
cpiPlatformDxe/AcpiPlatform.c<br>
index 999e9f151e..34d9fc80d0 100644<br>
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c<br>
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c<br>
@@ -243,6 +243,21 @@ InstallAcpiTables (<br>
=C2=A0{<br>
=C2=A0 =C2=A0EFI_STATUS=C2=A0 Status;<br>
<br>
+=C2=A0 Status =3D InstallBhyveTables (AcpiTable);<br>
+=C2=A0 if (!EFI_ERROR (Status)) {<br>
+=C2=A0 =C2=A0 return EFI_SUCCESS;<br>
+=C2=A0 }<br>
+<br>
+=C2=A0 if (Status !=3D EFI_NOT_FOUND) {<br>
+=C2=A0 =C2=A0 DEBUG ((<br>
+=C2=A0 =C2=A0 =C2=A0 DEBUG_INFO,<br>
+=C2=A0 =C2=A0 =C2=A0 &quot;%a: unable to install bhyve&#39;s ACPI tables (=
%r)\n&quot;,<br>
+=C2=A0 =C2=A0 =C2=A0 __FUNCTION__,<br>
+=C2=A0 =C2=A0 =C2=A0 Status<br>
+=C2=A0 =C2=A0 =C2=A0 ));<br>
+=C2=A0 =C2=A0 return Status;<br>
+=C2=A0 }<br>
+<br>
=C2=A0 =C2=A0Status =3D InstallOvmfFvTables (AcpiTable);<br>
<br>
=C2=A0 =C2=A0return Status;<br>
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/Bhyve/A=
cpiPlatformDxe/AcpiPlatform.h<br>
index 54d1af073e..b2724135d0 100644<br>
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h<br>
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h<br>
@@ -46,6 +46,12 @@ BhyveInstallAcpiTable (<br>
=C2=A0 =C2=A0OUT=C2=A0 UINTN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 *TableKey<br>
=C2=A0 =C2=A0);<br>
<br>
+EFI_STATUS<br>
+EFIAPI<br>
+InstallBhyveTables (<br>
+=C2=A0 IN=C2=A0 =C2=A0EFI_ACPI_TABLE_PROTOCOL=C2=A0 *AcpiProtocol<br>
+=C2=A0 );<br>
+<br>
=C2=A0EFI_STATUS<br>
=C2=A0EFIAPI<br>
=C2=A0InstallXenTables (<br>
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c b/OvmfPkg/Bhyve/AcpiPlat=
formDxe/Bhyve.c<br>
index e216a21bfa..5e1b759c01 100644<br>
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c<br>
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c<br>
@@ -13,6 +13,18 @@<br>
=C2=A0#include &lt;Library/MemoryAllocationLib.h&gt;<br>
=C2=A0#include &lt;Library/QemuFwCfgLib.h&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0// QemuFwCfgFindFile()<br>
<br>
+#define BHYVE_ACPI_PHYSICAL_ADDRESS=C2=A0 ((UINTN)0x000F2400)<br>
+#define BHYVE_BIOS_PHYSICAL_END=C2=A0 =C2=A0 =C2=A0 ((UINTN)0x00100000)<br=
>
+<br>
+#pragma pack (1)<br>
+<br>
+typedef struct {<br>
+=C2=A0 EFI_ACPI_DESCRIPTION_HEADER=C2=A0 =C2=A0 Header;<br>
+=C2=A0 UINT64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Tables[0];<br>
+} EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE;<br>
+<br>
+#pragma pack ()<br>
+<br>
=C2=A0STATIC<br>
=C2=A0EFI_STATUS<br>
=C2=A0EFIAPI<br>
@@ -164,3 +176,257 @@ BhyveInstallAcpiTable (<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TableKey<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 );<br>
=C2=A0}<br>
+<br>
+/**<br>
+=C2=A0 Get the address of bhyve&#39;s ACPI Root System Description Pointer=
 (RSDP).<br>
+<br>
+=C2=A0 @param=C2=A0 RsdpPtr=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0Return pointer to RSDP.<br>
+<br>
+=C2=A0 @return EFI_SUCCESS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Bhyve&#39;s RS=
DP successfully found.<br>
+=C2=A0 @return EFI_NOT_FOUND=C2=A0 =C2=A0 =C2=A0 =C2=A0Couldn&#39;t find b=
hyve&#39;s RSDP.<br>
+=C2=A0 @return EFI_UNSUPPORTED=C2=A0 =C2=A0 =C2=A0Revision is lower than 2=
.<br>
+=C2=A0 @return EFI_PROTOCOL_ERROR=C2=A0 Invalid RSDP found.<br>
+<br>
+**/<br>
+EFI_STATUS<br>
+EFIAPI<br>
+BhyveGetAcpiRsdp (<br>
+=C2=A0 OUT=C2=A0 =C2=A0EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER=C2=A0 =
**RsdpPtr<br>
+=C2=A0 )<br>
+{<br>
+=C2=A0 UINTN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0RsdpAddress;<br>
+=C2=A0 EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER=C2=A0 *Rsdp;<br>
+<br>
+=C2=A0 if (RsdpPtr =3D=3D NULL) {<br>
+=C2=A0 =C2=A0 return EFI_INVALID_PARAMETER;<br>
+=C2=A0 }<br>
+<br>
+=C2=A0 //<br>
+=C2=A0 // Detect the RSDP<br>
+=C2=A0 //<br>
+=C2=A0 for (RsdpAddress =3D BHYVE_ACPI_PHYSICAL_ADDRESS;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0RsdpAddress &lt; BHYVE_BIOS_PHYSICAL_END;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0RsdpAddress +=3D 0x10)<br>
+=C2=A0 {<br>
+=C2=A0 =C2=A0 Rsdp =3D NUMERIC_VALUE_AS_POINTER (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0EFI_ACPI_2_0_ROOT_SYSTEM_D=
ESCRIPTION_POINTER,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0RsdpAddress<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0);<br>
+=C2=A0 =C2=A0 if (Rsdp-&gt;Signature !=3D EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIP=
TION_POINTER_SIGNATURE) {<br>
+=C2=A0 =C2=A0 =C2=A0 continue;<br>
+=C2=A0 =C2=A0 }<br>
+<br>
+=C2=A0 =C2=A0 if (Rsdp-&gt;Revision &lt; 2) {<br>
+=C2=A0 =C2=A0 =C2=A0 DEBUG ((DEBUG_INFO, &quot;%a: unsupported RSDP found\=
n&quot;, __FUNCTION__));<br>
+=C2=A0 =C2=A0 =C2=A0 return EFI_UNSUPPORTED;<br>
+=C2=A0 =C2=A0 }<br>
+<br>
+=C2=A0 =C2=A0 //<br>
+=C2=A0 =C2=A0 // For ACPI 1.0/2.0/3.0 the checksum of first 20 bytes shoul=
d be 0.<br>
+=C2=A0 =C2=A0 // For ACPI 2.0/3.0 the checksum of the entire table should =
be 0.<br>
+=C2=A0 =C2=A0 //<br>
+=C2=A0 =C2=A0 UINT8=C2=A0 Sum =3D CalculateCheckSum8 (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(CONS=
T UINT8 *)Rsdp,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sizeo=
f (EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER)<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0);<br=
>
+=C2=A0 =C2=A0 if (Sum !=3D 0) {<br>
+=C2=A0 =C2=A0 =C2=A0 DEBUG ((<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 DEBUG_INFO,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;%a: RSDP header checksum not valid: 0x%0=
2x\n&quot;,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 __FUNCTION__,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Sum<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 ));<br>
+=C2=A0 =C2=A0 =C2=A0 return EFI_PROTOCOL_ERROR;<br>
+=C2=A0 =C2=A0 }<br>
+<br>
+=C2=A0 =C2=A0 Sum =3D CalculateCheckSum8 (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (CONST UINT8 *)Rsdp,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sizeof (EFI_ACPI_2_0_ROOT_SYSTEM=
_DESCRIPTION_POINTER)<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 );<br>
+=C2=A0 =C2=A0 if (Sum !=3D 0) {<br>
+=C2=A0 =C2=A0 =C2=A0 DEBUG ((<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 DEBUG_INFO,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;%a: RSDP table checksum not valid: 0x%02=
x\n&quot;,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 __FUNCTION__,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Sum<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 ));<br>
+=C2=A0 =C2=A0 =C2=A0 return EFI_PROTOCOL_ERROR;<br>
+=C2=A0 =C2=A0 }<br>
+<br>
+=C2=A0 =C2=A0 //<br>
+=C2=A0 =C2=A0 // RSDP was found and is valid<br>
+=C2=A0 =C2=A0 //<br>
+=C2=A0 =C2=A0 *RsdpPtr =3D Rsdp;<br>
+<br>
+=C2=A0 =C2=A0 return EFI_SUCCESS;<br>
+=C2=A0 }<br>
+<br>
+=C2=A0 DEBUG ((DEBUG_INFO, &quot;%a: RSDP not found\n&quot;, __FUNCTION__)=
);<br>
+=C2=A0 return EFI_NOT_FOUND;<br>
+}<br>
+<br>
+/**<br>
+=C2=A0 Get bhyve&#39;s ACPI tables from the RSDP. And install bhyve&#39;s =
ACPI tables<br>
+=C2=A0 into the RSDT/XSDT using InstallAcpiTable.<br>
+<br>
+=C2=A0 @param=C2=A0 AcpiProtocol=C2=A0 =C2=A0 =C2=A0 =C2=A0 Protocol insta=
nce pointer.<br>
+<br>
+=C2=A0 @return EFI_SUCCESS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0All tables wer=
e successfully inserted.<br>
+=C2=A0 @return EFI_UNSUPPORTED=C2=A0 =C2=A0 =C2=A0Bhyve&#39;s ACPI tables =
doesn&#39;t include a XSDT.<br>
+=C2=A0 @return EFI_PROTOCOL_ERROR=C2=A0 Invalid XSDT found.<br>
+<br>
+=C2=A0 @return=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0Error codes propagated from underlying functions.<br>
+**/<br>
+EFI_STATUS<br>
+EFIAPI<br>
+InstallBhyveTables (<br>
+=C2=A0 IN=C2=A0 =C2=A0EFI_ACPI_TABLE_PROTOCOL=C2=A0 *AcpiProtocol<br>
+=C2=A0 )<br>
+{<br>
+=C2=A0 EFI_STATUS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Statu=
s;<br>
+=C2=A0 UINTN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0TableHandle;<br>
+=C2=A0 EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER=C2=A0 *Rsdp;<br>
+=C2=A0 EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE=C2=A0 *Facs;<br>
+=C2=A0 EFI_ACPI_DESCRIPTION_HEADER=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*Dsdt;<br>
+<br>
+=C2=A0 Rsdp =3D NULL;<br>
+=C2=A0 Facs =3D NULL;<br>
+=C2=A0 Dsdt =3D NULL;<br>
+<br>
+=C2=A0 //<br>
+=C2=A0 // Try to find bhyve ACPI tables<br>
+=C2=A0 //<br>
+=C2=A0 Status =3D BhyveGetAcpiRsdp (&amp;Rsdp);<br>
+=C2=A0 if (EFI_ERROR (Status)) {<br>
+=C2=A0 =C2=A0 DEBUG ((DEBUG_INFO, &quot;%a: can&#39;t get RSDP (%r)\n&quot=
;, __FUNCTION__, Status));<br>
+=C2=A0 =C2=A0 return Status;<br>
+=C2=A0 }<br>
+<br>
+=C2=A0 //<br>
+=C2=A0 // Bhyve should always provide a XSDT<br>
+=C2=A0 //<br>
+=C2=A0 EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE *CONST=C2=A0 Xsdt =
=3D<br>
+=C2=A0 =C2=A0 NUMERIC_VALUE_AS_POINTER (<br>
+=C2=A0 =C2=A0 =C2=A0 EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE,<br>
+=C2=A0 =C2=A0 =C2=A0 Rsdp-&gt;XsdtAddress<br>
+=C2=A0 =C2=A0 =C2=A0 );<br>
+<br>
+=C2=A0 if (Xsdt =3D=3D NULL) {<br>
+=C2=A0 =C2=A0 DEBUG ((DEBUG_INFO, &quot;%a: XSDT not found\n&quot;, __FUNC=
TION__));<br>
+=C2=A0 =C2=A0 return EFI_UNSUPPORTED;<br>
+=C2=A0 }<br>
+<br>
+=C2=A0 if (Xsdt-&gt;Header.Length &lt; sizeof (EFI_ACPI_DESCRIPTION_HEADER=
)) {<br>
+=C2=A0 =C2=A0 DEBUG ((DEBUG_INFO, &quot;%a: invalid XSDT length\n&quot;, _=
_FUNCTION__));<br>
+=C2=A0 =C2=A0 return EFI_PROTOCOL_ERROR;<br>
+=C2=A0 }<br>
+<br>
+=C2=A0 //<br>
+=C2=A0 // Install ACPI tables<br>
+=C2=A0 //<br>
+=C2=A0 CONST UINTN=C2=A0 NumberOfTableEntries =3D<br>
+=C2=A0 =C2=A0 (Xsdt-&gt;Header.Length - sizeof (Xsdt-&gt;Header)) / sizeof=
 (UINT64);<br>
+<br>
+=C2=A0 for (UINTN Index =3D 0; Index &lt; NumberOfTableEntries; Index++) {=
<br>
+=C2=A0 =C2=A0 EFI_ACPI_DESCRIPTION_HEADER *CONST=C2=A0 CurrentTable =3D<br=
>
+=C2=A0 =C2=A0 =C2=A0 NUMERIC_VALUE_AS_POINTER (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 EFI_ACPI_DESCRIPTION_HEADER,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Xsdt-&gt;Tables[Index]<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 );<br>
+=C2=A0 =C2=A0 Status =3D AcpiProtocol-&gt;InstallAcpiTable (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0AcpiProtocol,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CurrentTable,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CurrentTable-&gt;Length,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&amp;TableHandle<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0);<br>
+=C2=A0 =C2=A0 if (EFI_ERROR (Status)) {<br>
+=C2=A0 =C2=A0 =C2=A0 DEBUG ((<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 DEBUG_INFO,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;%a: failed to install ACPI table %c%c%c%=
c (%r)\n&quot;,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 __FUNCTION__,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable-=
&gt;Signature)[0],<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable-=
&gt;Signature)[1],<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable-=
&gt;Signature)[2],<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 NUMERIC_VALUE_AS_POINTER (UINT8, CurrentTable-=
&gt;Signature)[3],<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Status<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 ));<br>
+=C2=A0 =C2=A0 =C2=A0 return Status;<br>
+=C2=A0 =C2=A0 }<br>
+<br>
+=C2=A0 =C2=A0 if (CurrentTable-&gt;Signature =3D=3D EFI_ACPI_2_0_FIXED_ACP=
I_DESCRIPTION_TABLE_SIGNATURE) {<br>
+=C2=A0 =C2=A0 =C2=A0 EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *CONST=C2=
=A0 Fadt =3D<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *CO=
NST)CurrentTable;<br>
+=C2=A0 =C2=A0 =C2=A0 if (Fadt-&gt;XFirmwareCtrl) {<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Facs =3D NUMERIC_VALUE_AS_POINTER (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0EFI_ACPI_2_0=
_FIRMWARE_ACPI_CONTROL_STRUCTURE,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Fadt-&gt;XFi=
rmwareCtrl<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0);<br>
+=C2=A0 =C2=A0 =C2=A0 } else {<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Facs =3D NUMERIC_VALUE_AS_POINTER (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0EFI_ACPI_2_0=
_FIRMWARE_ACPI_CONTROL_STRUCTURE,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Fadt-&gt;Fir=
mwareCtrl<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0);<br>
+=C2=A0 =C2=A0 =C2=A0 }<br>
+<br>
+=C2=A0 =C2=A0 =C2=A0 if (Fadt-&gt;XDsdt) {<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Dsdt =3D NUMERIC_VALUE_AS_POINTER (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0EFI_ACPI_DES=
CRIPTION_HEADER,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Fadt-&gt;XDs=
dt<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0);<br>
+=C2=A0 =C2=A0 =C2=A0 } else {<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Dsdt =3D NUMERIC_VALUE_AS_POINTER (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0EFI_ACPI_DES=
CRIPTION_HEADER,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Fadt-&gt;Dsd=
t<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0);<br>
+=C2=A0 =C2=A0 =C2=A0 }<br>
+=C2=A0 =C2=A0 }<br>
+=C2=A0 }<br>
+<br>
+=C2=A0 //<br>
+=C2=A0 // Install FACS<br>
+=C2=A0 //<br>
+=C2=A0 if (Facs !=3D NULL) {<br>
+=C2=A0 =C2=A0 Status =3D AcpiProtocol-&gt;InstallAcpiTable (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0AcpiProtocol,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Facs,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Facs-&gt;Length,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&amp;TableHandle<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0);<br>
+=C2=A0 =C2=A0 if (EFI_ERROR (Status)) {<br>
+=C2=A0 =C2=A0 =C2=A0 DEBUG ((<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 DEBUG_INFO,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;%a: failed to install FACS (%r)\n&quot;,=
<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 __FUNCTION__,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Status<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 ));<br>
+=C2=A0 =C2=A0 =C2=A0 return Status;<br>
+=C2=A0 =C2=A0 }<br>
+=C2=A0 }<br>
+<br>
+=C2=A0 //<br>
+=C2=A0 // Install DSDT<br>
+=C2=A0 // If it&#39;s not found, something bad happened. Don&#39;t continu=
e execution.<br>
+=C2=A0 //<br>
+=C2=A0 if (Dsdt =3D=3D NULL) {<br>
+=C2=A0 =C2=A0 DEBUG ((DEBUG_ERROR, &quot;%a: failed to find DSDT\n&quot;, =
__FUNCTION__));<br>
+=C2=A0 =C2=A0 CpuDeadLoop ();<br>
+=C2=A0 }<br>
+<br>
+=C2=A0 Status =3D AcpiProtocol-&gt;InstallAcpiTable (<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0AcpiProtocol,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0Dsdt,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0Dsdt-&gt;Length,<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0&amp;TableHandle<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0);<br>
+=C2=A0 if (EFI_ERROR (Status)) {<br>
+=C2=A0 =C2=A0 DEBUG ((<br>
+=C2=A0 =C2=A0 =C2=A0 DEBUG_INFO,<br>
+=C2=A0 =C2=A0 =C2=A0 &quot;%a: failed to install DSDT (%r)\n&quot;,<br>
+=C2=A0 =C2=A0 =C2=A0 __FUNCTION__,<br>
+=C2=A0 =C2=A0 =C2=A0 Status<br>
+=C2=A0 =C2=A0 =C2=A0 ));<br>
+=C2=A0 =C2=A0 return Status;<br>
+=C2=A0 }<br>
+<br>
+=C2=A0 return EFI_SUCCESS;<br>
+}<br>
-- <br>
2.40.0<br>
<br>
<br>
</blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre=
fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d=
iv>

--00000000000000eace05f831cab3--

From nobody Fri Mar 31 19:55:56 2023
X-Original-To: virtualization@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pp9yP3NSZz43B9v
	for <virtualization@mlmmj.nyi.freebsd.org>; Fri, 31 Mar 2023 19:55:57 +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)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4Pp9yP2P7qz3NTZ
	for <virtualization@FreeBSD.org>; Fri, 31 Mar 2023 19:55:57 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1680292557;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=IlF9y+/2wW/vFUEXAiddRZD3TJjeO3+RwoFWwxDfn5Q=;
	b=hUOCpIDrkEgu/QSOhL2mODX8TU5qqyVNov+ndy3H+GVtS0ClhdnFQKKQ8tw1KC4uA2JxkJ
	IID9L9o0PG6a4wb61yznwU4Xihn0PL6Q2KMTbIOEKrPKldK/IU9hdFR/8HmDlU8BZOJXR3
	upXJGIUiZBh0ZMN4D5pocrqvUrZYKbaQkmGbtXFCzcqPbmwaOw1CvaJfgWL7ZH0uS+kIe5
	Gn169wKs8NW5rxUmYD5CB7CNef5pcmpngeh2brCV6s5gQt5lnNjacVwLpith2cNsu+Z+7s
	UrR2ex1PVBOF8ZLdGiK6Tzdns5s5fcGnuutKre0o1eJVz0C7DISstBxv3oIhzw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680292557; a=rsa-sha256; cv=none;
	b=U/m93JvJv8ShW9k/Xh47THeQ+Ys6XzR0ROIS6km1xwvhlf/7WB7xQVs1plh4/xfR3z58AG
	RqWwELfYq04fEHp/J+n4vUQw0HB5a359GtFyCkzMdqQNoOuNdVaG+dDoc5O53MbexMKwPY
	KPDovDogVc+m1Pzc0ERRsjKUK15+Skbma8I7C4Owg8s06qupJVWv70ucaUpSleul18ftVF
	csAgTRiHGmIwRm7uGeavT0m78xXywDyPMSyRlsKMbgaYUYqJzLsOqgvmx6tfscVk8RzXU7
	F4jz25gtdwyq6LCoT7U1NiL119xRayUIZzbtLwq9P4Ll6KKUWw/3RvMH9hG5Qg==
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pp9yP1WLVz16Yd
	for <virtualization@FreeBSD.org>; Fri, 31 Mar 2023 19:55:57 +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 32VJtvRV063482
	for <virtualization@FreeBSD.org>; Fri, 31 Mar 2023 19:55:57 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
Received: (from bugzilla@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 32VJtvJD063481
	for virtualization@FreeBSD.org; Fri, 31 Mar 2023 19:55:57 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: virtualization@FreeBSD.org
Subject: [Bug 221074] Hyper V Gen 2 install has no mouse
Date: Fri, 31 Mar 2023 19:55:56 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: misc
X-Bugzilla-Version: CURRENT
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Some People
X-Bugzilla-Who: commit-hook@FreeBSD.org
X-Bugzilla-Status: Open
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: virtualization@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: 
Message-ID: <bug-221074-27103-NtHI7METq8@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-221074-27103@https.bugs.freebsd.org/bugzilla/>
References: <bug-221074-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
List-Id: Discussion <freebsd-virtualization.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization
List-Help: <mailto:virtualization+help@freebsd.org>
List-Post: <mailto:virtualization@freebsd.org>
List-Subscribe: <mailto:virtualization+subscribe@freebsd.org>
List-Unsubscribe: <mailto:virtualization+unsubscribe@freebsd.org>
Sender: owner-freebsd-virtualization@freebsd.org
X-BeenThere: freebsd-virtualization@freebsd.org
MIME-Version: 1.0
X-ThisMailContainsUnwantedMimeParts: N

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

--- Comment #33 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3D21f4e817fde79d5de79bfbdf180d358ca=
5f48bf9

commit 21f4e817fde79d5de79bfbdf180d358ca5f48bf9
Author:     Yuri <yuri@aetern.org>
AuthorDate: 2023-02-05 15:32:08 +0000
Commit:     Yuri Pankov <yuripv@FreeBSD.org>
CommitDate: 2023-03-31 18:44:04 +0000

    hv_hid: Hyper-V HID driver

    Hyper-V HID driver using hidbus/hms.

    Reviewed by:    wulf
    MFC after:      1 week
    PR:             221074
    Differential revision:  https://reviews.freebsd.org/D38140

    (cherry picked from commit e4d3f1e40ab3327e4ff6f689f54a64bd2ebc0568)

 sys/amd64/conf/NOTES                  |   1 +
 sys/conf/files.x86                    |   1 +
 sys/dev/hid/hidbus.c                  |   1 +
 sys/dev/hyperv/input/hv_hid.c (new)   | 564 ++++++++++++++++++++++++++++++=
++++
 sys/i386/conf/NOTES                   |   1 +
 sys/modules/hyperv/Makefile           |   2 +-
 sys/modules/hyperv/hid/Makefile (new) |  12 +
 7 files changed, 581 insertions(+), 1 deletion(-)

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

From nobody Fri Mar 31 20:14:25 2023
X-Original-To: virtualization@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PpBMl0wZYz43CVh
	for <virtualization@mlmmj.nyi.freebsd.org>; Fri, 31 Mar 2023 20:14:27 +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)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4PpBMk704Nz3Qdf
	for <virtualization@FreeBSD.org>; Fri, 31 Mar 2023 20:14:26 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1680293667;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=97ojOa1Nu2HvjKkzw+I/aEv/1Zx0uJXGYD+w7fjxfJY=;
	b=fI4RmutolRPFSJY9NXF4XfWwk3L83XnsfPmew3nQTbSuqbpViIFIRKXavzvSKqFNxSK8x+
	MEALRw1UZK7H/nYYbcB1DhtisRNcokhVkXuvb65/Jz8daZnIfg6S8SoUqRoltJjhEDWTK2
	8Z5bUiBpJ79NUSZyFSz1TrgFTlh0uaeG0UsKh2j8/QqG97ospA63za39VJhwhtI07gX6R7
	SwNmxfU7fv98h7lk62uljgEPLgR9mDHNlhrU6bL/GPiUmXV6xdmQJcJ44wM2S2uEDV2pa0
	s4iaMTYKc96bswdTumVMQHOKNqcAcU56kyfUq/TcoksCI4i5XWGtep9S9/P4Iw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680293667; a=rsa-sha256; cv=none;
	b=f5KS0dCrMhe0zKIO72JCiY4AUexlQBeqw09ihb/kDBA0tlDemtOQc/nw6RXsoil2a7QhjR
	cEnBS8K8gkdJ5I/twEegJ+LwBnNDSwog91jEezBxMFQzPZi+Wf/kkjtWKIVRN/Gww6kw0k
	E9bJ6iIz+9ld4Okw7c2U99k3fG5bGhG33ZZhhIppyTEQ+6Rf+KJeAhzUUzPk10faslzgf+
	XxE4QVtL8d2LHAoN90Z8KbqHv4QamEuqGqoyHj19qEgHVRPYDgw6dE4N5rafHrNNm5ZysN
	v2SIiJMdM/XGnNjHeNiUJPQD5nN81orbNeR4Wp/BLhZY6BPJJS9V2eCB6W3fsA==
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PpBMk65L4z16PJ
	for <virtualization@FreeBSD.org>; Fri, 31 Mar 2023 20:14:26 +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 32VKEQdM099123
	for <virtualization@FreeBSD.org>; Fri, 31 Mar 2023 20:14:26 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 32VKEQ6d099122
	for virtualization@FreeBSD.org; Fri, 31 Mar 2023 20:14:26 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 221074] Hyper V Gen 2 install has no mouse
Date: Fri, 31 Mar 2023 20:14:25 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: misc
X-Bugzilla-Version: CURRENT
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Some People
X-Bugzilla-Who: yuripv@FreeBSD.org
X-Bugzilla-Status: Closed
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: virtualization@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: resolution cc bug_status
Message-ID: <bug-221074-27103-diEPAtcoyT@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-221074-27103@https.bugs.freebsd.org/bugzilla/>
References: <bug-221074-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
List-Id: Discussion <freebsd-virtualization.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization
List-Help: <mailto:virtualization+help@freebsd.org>
List-Post: <mailto:virtualization@freebsd.org>
List-Subscribe: <mailto:virtualization+subscribe@freebsd.org>
List-Unsubscribe: <mailto:virtualization+unsubscribe@freebsd.org>
Sender: owner-freebsd-virtualization@freebsd.org
X-BeenThere: freebsd-virtualization@freebsd.org
MIME-Version: 1.0
X-ThisMailContainsUnwantedMimeParts: N

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

Yuri Pankov <yuripv@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |yuripv@FreeBSD.org
             Status|Open                        |Closed

--- Comment #34 from Yuri Pankov <yuripv@FreeBSD.org> ---
Marking this as fixed for now (sorry it didn't made it to 13.2).

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