From nobody Wed Dec 4 09:02:44 2024 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 4Y3BQ22rm9z5gFG2 for ; Wed, 04 Dec 2024 09:03:22 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y3BQ2127gz4rR4; Wed, 4 Dec 2024 09:03:22 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-7f4325168c8so3361997a12.1; Wed, 04 Dec 2024 01:03:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733303000; x=1733907800; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=O0plMbKaoO8AIT19rsL8hwPQADjAHuUzDcVcavddh2c=; b=OsPycTbkMKeT8APAgh42L34NECXHOrXv+Xb4/JhyN/uvu3XCjyaqWm7tl9eX+jflpV 0xt0T6oLfqn1b72gnDz9yMP3h2XGTBxGIXGn0nfKB9wo84M5eTzJVKifLGIvT3UOGGR2 iRbV7IxzAvVS8u1QELR3y+NP4Q7/hzV+DE+Tqv7Q/e6BcG2rfeWPWWlKJip+xmwvbhm6 ID87TIfXNOevl0g5++a+iY8ptFzcHY6ccUL5EbO4Yo20NpjVochEmVNhmiosCXcNdlZi oxt3l8AWGL6ImqGjt0fKKIsh1FVeTQSleEYyBre5qKd8LypsSd4gM4q6mx3LR1xA3vH2 x1gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733303000; x=1733907800; 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=O0plMbKaoO8AIT19rsL8hwPQADjAHuUzDcVcavddh2c=; b=R0GIsQcvm2CW3Nv2SB5883GsJzLOeax+xLIdwIWXQ1SwUOdtIaWKIUnBpyppCCqflm L8/8xjsGQHsvbofOkWi7qqF9MBrctAcxuabTQmlGkYc/iqk+J9ezHAKPdt64sTfeO4tY 6EkwjeJSKfFSLMqRUBSFOgYAqhOfU2gBu6XgruJ8Kp6mUbTN953q+CVqmO1xKF5kiU2t 41ROhDbQRe2VCfUxPfYwlAiPFbLaq2rO1MaPfAH7swzWMXrmfAzfaIdL6tRsWe7JFmon Im6QvlNFxC02Dor16eEODj/GTzKaAKLH9ubmvfSs4jKGLADh5qHOvAExccXSV2HyW7fr RXTg== X-Gm-Message-State: AOJu0YyCwf8FnmjbA28qK+0h9Uuv1vWNyTgTmudElrXZHxlzNtqMavom I9z2AIg2Svge2cmYQnf2AxZ+8Iks01jAiujF2FwzGiQZ0GtLkiSFo3PVsSwxsw6jJtrAFaCEN/E g6wk0rDhfgSgj1LC65dO30Jve5LoD9sX+Vc0= X-Gm-Gg: ASbGncvAgtkJKR2p7UuoreJlP3AnJwCgvtk3KnLQhLJEXBd3H1OgpB6DzB+QX2Qw9Rv iZO2XXxpCmb54lopuomG1lzPpDJ8YEGo3HNTW/9edh8RR3Q9vIw== X-Google-Smtp-Source: AGHT+IHsdfF0RMsRftzw5KELxLwtEftlwQ5W7g+4sujCmYC4moVilQvKtzZmrjHSq1Zw/cSNp8YFb1fGKrgi5Uz9bHo= X-Received: by 2002:a17:90b:3849:b0:2ee:fa0c:ce9e with SMTP id 98e67ed59e1d1-2ef012748cemr7407853a91.32.1733303000448; Wed, 04 Dec 2024 01:03:20 -0800 (PST) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 References: <7905a2e7-3107-bf4d-10f7-2547a2af8df3@FreeBSD.org> In-Reply-To: <7905a2e7-3107-bf4d-10f7-2547a2af8df3@FreeBSD.org> From: Mario Marietto Date: Wed, 4 Dec 2024 10:02:44 +0100 Message-ID: Subject: Re: Failed to emulate instruction sequence [ 41f646040874064c017d88eb144c89 ] at 0xbea5fcf9 To: "Sean C. Farley" Cc: FreeBSD virtualization Content-Type: multipart/alternative; boundary="000000000000a1492a06286e0d62" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated 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-Queue-Id: 4Y3BQ2127gz4rR4 X-Spamd-Bar: ---- --000000000000a1492a06286e0d62 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The first thing I did has been to exchange all the BHYVE_UEFI* files between the working system and the not working system. Unfortunately the error is not gone. On Wed, Dec 4, 2024 at 6:16=E2=80=AFAM Sean C. Farley wro= te: > On Mon, 2 Dec 2024, Mario Marietto wrote: > > > Hello to everyone. > > > > Recently I've upgraded one of my FreeBSD systems and I see a strange > > error when I try to boot Android 7.1.1. I have never seen this error > > before and I also have another system where I haven't applied the > > latest pkg upgrades where Android is still able to boot. > > The bhyve parameters that I use in both systems are the following: > > > > /usr/sbin/./bhyve -S -c sockets=3D2,cores=3D2,threads=3D2 -m 8G -w -H -= A \ > > -s 0,hostbridge \ > > -s > > > 1,ahci-hd,/mnt/zroot-133/bhyve/img/Android/DarkMatter-qemu.img,bootindex= =3D1 \ > > -s 8:0,passthru,4/0/0 \ > > -s 11,hda,play=3D/dev/dsp,rec=3D/dev/dsp \ > > -s 13,virtio-net,tap13 \ > > -s 29,fbuf,tcp=3D0.0.0.0:5913,w=3D1440,h=3D900,wait \ > > -s 30,xhci,tablet \ > > -s 31,lpc \ > > -l > > > bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,/usr/local/shar= e/uefi-firmware/BHYVE_UEFI_VARS.fd > > \ > > vm0:13 < /dev/null & sleep 5 && vncviewer 0:13 && echo vncviewer 0:13 & > > Do you actually want the UEFI variables to be written to > /usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd? That file is > actually installed by edk2-bhyve. You should pick a different location > for the variables file to be written. Plus, reinstall edk2-bhyve to > make sure nothing unexpected happens, especially if you have had > multiple bhyve instances using that same file. Probably, save it just > in case there are any values you need to keep first. > > $ pkg which /usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd > /usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd was installed by packag= e > edk2-bhyve-g202308_5 > $ ls -l /usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd > lrwxr-xr-x 1 root wheel 32 Nov 29 03:28 > /usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd@ -> > ../edk2-bhyve/BHYVE_UEFI_VARS.fd > $ pkg which /usr/local/share/edk2-bhyve/BHYVE_UEFI_VARS.fd > /usr/local/share/edk2-bhyve/BHYVE_UEFI_VARS.fd was installed by package > edk2-bhyve-g202308_5 > $ pkg check -s edk2-bhyve-g202308_5 > Checking edk2-bhyve-g202308_5: 100% > > I would run that check to make sure it is still valid. > > When I first ran into the error, I just replaced the UEFI vars file with > an old one from a ZFS snapshot to see what was happening, which worked > until the next time I rebooted the VM. > > Sean > -- > scf@FreeBSD.org > --=20 Mario. --000000000000a1492a06286e0d62 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The first thing I did has been to exchange all the BHYVE_U= EFI* files between the working system and the not working system. Unfortuna= tely the error is not gone.

On Wed, Dec 4, 2024 at 6:16=E2=80=AFAM Sean= C. Farley <scf@fre= ebsd.org> wrote:
On Mon, 2 Dec 2024, Mario Marietto wrote:

> Hello to everyone.
>
> Recently I've upgraded one of my FreeBSD systems and I see a stran= ge
> error when I try to boot Android 7.1.1. I have never seen this error <= br> > before and I also have another system where I haven't applied the =
> latest pkg upgrades where Android is still able to boot.
> The bhyve parameters that I use in both systems are the following:
>
> /usr/sbin/./bhyve -S -c sockets=3D2,cores=3D2,threads=3D2 -m 8G -w -H = -A \
> -s 0,hostbridge \
> -s
> 1,ahci-hd,/mnt/zroot-133/bhyve/img/Android/DarkMatter-qemu.img,bootind= ex=3D1 \
> -s 8:0,passthru,4/0/0 \
> -s 11,hda,play=3D/dev/dsp,rec=3D/dev/dsp \
> -s 13,virtio-net,tap13 \
> -s 29,fbuf,tcp=3D0.0.0.0:5913,w=3D1440,h=3D900,wait \
> -s 30,xhci,tablet \
> -s 31,lpc \
> -l
> bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,/usr/local/s= hare/uefi-firmware/BHYVE_UEFI_VARS.fd
> \
> vm0:13 < /dev/null & sleep 5 && vncviewer 0:13 &&am= p; echo vncviewer 0:13 &

Do you actually want the UEFI variables to be written to
/usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd?=C2=A0 That file is
actually installed by edk2-bhyve.=C2=A0 You should pick a different locatio= n
for the variables file to be written.=C2=A0 Plus, reinstall edk2-bhyve to <= br> make sure nothing unexpected happens, especially if you have had
multiple bhyve instances using that same file.=C2=A0 Probably, save it just=
in case there are any values you need to keep first.

$ pkg which /usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd
/usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd was installed by package = edk2-bhyve-g202308_5
$ ls -l /usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd
lrwxr-xr-x=C2=A0 1 root wheel 32 Nov 29 03:28 /usr/local/share/uefi-firmwar= e/BHYVE_UEFI_VARS.fd@ -> ../edk2-bhyve/BHYVE_UEFI_VARS.fd
$ pkg which /usr/local/share/edk2-bhyve/BHYVE_UEFI_VARS.fd
/usr/local/share/edk2-bhyve/BHYVE_UEFI_VARS.fd was installed by package edk= 2-bhyve-g202308_5
$ pkg check -s edk2-bhyve-g202308_5
Checking edk2-bhyve-g202308_5: 100%

I would run that check to make sure it is still valid.

When I first ran into the error, I just replaced the UEFI vars file with an old one from a ZFS snapshot to see what was happening, which worked
until the next time I rebooted the VM.

Sean
--
scf@FreeBSD.org


--
Ma= rio.
--000000000000a1492a06286e0d62--